@SpringBootConfiguration:Spring Boot 的配置类;
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Inherited
@SpringBootConfiguration
@EnableAutoConfiguration
@ComponentScan(
excludeFilters = {@Filter(
type = FilterType.CUSTOM,
classes = {TypeExcludeFilter.class}
), @Filter(
type = FilterType.CUSTOM,
classes = {AutoConfigurationExcludeFilter.class}
)}
)
标注在某个类上,表示这是一个spring boot的配置类;
@Configuration:配置类上来标注这个注解;
配置类------配置文件;配置类也是容器中的一个组件;@Component
@EnableAutoConfiguration:开启自动配置功能;
以前我们需要配置的东西,springboot帮我们自动配置
@EnableAutoConfiguration告诉springboot开启自动配置功能;这样自动配置才能生效;