5- @SpringBootApplication annotation
@SpringBootApplication internally contains
--> @SpringBootConfiguration
--> @EnableAutoConfiguration
--> @ComponentScan
@SpringBootConfiguration internally uses @Configuration which is a java based configuration.
There are three types of configuration
1- xml based configuration
2- java based configuration
3- annotation based configuration
@EnableAutoConfiguration- If spring-starter-web dependency exists then enables dispatcher
servlet to EnableAutoConfiguration classes.
@ComponentScan- to scan spring components in particular package
--> basically scan base and subpackages
Comments
Post a Comment