@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开启自动配置功能;这样自动配置才能生效;
最后
以上就是舒心蜜粉最近收集整理的关于SpringBootConfiguration详细介绍的全部内容,更多相关SpringBootConfiguration详细介绍内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复