
@SpringBootApplication
@SpringBootApplication注解包含了@SpringBootConfiguration , @EnableAutoConfiguration和@ComponentScan三个注解.
1.@SpringBootConfiguration
作用:申明当前类是一个配置类,最底层的注解是@Compent,Spring可以扫描到添加了该注解的类,读取其中的配置信息
2.@EnableAutoConfiguration
作用:开启自动化配置,告诉SpringBoot,并交由SpringBoot去进行配置处理
3.@ComponentScan
作用:配置组件扫描,扫描指定的包
扫描的范围是@SpringBootApplication所在的包及其子包

@SpringBootApplication所包含注解