我是靠谱客的博主 舒心蜜粉,这篇文章主要介绍SpringBootConfiguration详细介绍,现在分享给大家,希望可以做个参考。

@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详细介绍内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(54)

评论列表共有 0 条评论

立即
投稿
返回
顶部