Thursday, March 31, 2022

Spring boot annotation @SpringBootApplication

It is a combination of following annotations :

@Configuration - This will define a class that can contain multiple @Bean methods , this will use by IOC container to generate bean definition at run time.

@EnableAutoConfiguration - It automatically configure the spring application based on jar dependency. If it found any jar in your class path then it will automatically configure for the application without any need of bean definition.

@ComponentScan - It scan your package for bean definitions. we can specify packages in argument and with no argument it will scan current package and its subpackages.

Labels: , , ,

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home