Spring core
Spring core
spring container :
1. Bean Factory: It is one of the container in Spring .It is used to initialize the
bean in this Container .It is known as LAZY initialization. (It is not initialize
the bean in Start up spring.
When the bean is used or called then the bean is initialized in Bean factory).
Using @Lazy annotation we can perform lazy initialization.
@SpringBootApplication:
1. @SpringBootConfiguration.
2. @EnableAutoConfiguration.
3. @ComponentScan.
1. @SpringBootConfiguration.
2.@EnableAutoConfiguration.
3.@ComponentScan.
It is used to read the bean classes which is inside the main packages
and their sub packages. It is don't need other packages bean class Automatically so
we need to
override the @componentScan annotation in our class.
This annotation help to create object for bean classes (without using
new keyword).That object is Stored inside the spring container or IOC container .By
default the scope of the
object is Singleton we need more than one object for the class we have to change
scope of the object using @Scope("prototype").
2.@Autowired:
This annotation is used to inject the dependent object get from the IOC
container then inject into the target object.
3.@Qualifier: