finals Flashcards
omg (27 cards)
a powerful tool that simplifies backend development in Java, widely used to build web and desktop application
spring framework
core features of spring framework
-Inversion of Control (IoC)
-Dependency Injection(DI)
Spring manages the creation and lifecycle of objects (called beans), so you don’t have to manually create another object
Inversion of Control
Spring automatically provides the necessary components your application needs, like a smart assistant
Dependency Injection
example of (DI) ____ annotation, Spring can inject a service or repository into your class without using the new keyword
@Autowired
Components of Spring: Key Modules and Features in Spring
-Spring Core
-Spring JDBC
-Spring MVC
-Spring AOP
responsible for managing beans and handling dependency injection, heart of the spring
Spring Core
used to simplify database operation, removing repetitive code
Spring JDBC (Java Database Code)
follows the Model-View-Controller architecture to help build structured web application
Spring MVC
allows you to add cross-cutting concerns like jogging, security or transaction management without changing the core logic
Spring AOP(Aspect-Oriented Programming)
Spring annotations:
@Component
@Bean
@Autowired
Spring annotations: Which registers a class as a Spring-managed bean
@Component
Spring annotations: Which defines beans in Java configuration files
@Beans
Spring annotations: Used to mark a class for Spring to manage, including its backend logic
@Component
Spring annotations: Used to for automatic object creation
@Autowired
you write it once and Spring inserts it wherever needed
Spring AOP
t/f: Spring AOP is not for building user interfaces, it’s for adding reusable behaviors like logging
true
t/f: Spring MVC is designed to follow the Model-View-Controller pattern, which separates responsibilities for better organization
true
___ are Java objects managed by the Spring container
Beans
t/f: Spring previously reqired complex XML configurations, it now supports simpler annotation-based setups
true
the JDBC Template belong to
Spring JDBC
Useful when handling common concerns in one place, reducing code duplication
Spring AOP
t/f: Spring can replace some parts of Java EE(Enterprise Edition), it complements Java EE features.
true
In charge of managing the lifecycle of beans, including their creation, configuration, and destruction
Spring container