美文网首页Spring(Spring MVC/Spring Boot ...)
Springboot 排除不想加载的配置

Springboot 排除不想加载的配置

作者: OPice | 来源:发表于2019-10-31 15:38 被阅读0次

有些时候我们需要排除项目中一些不需要的配置

排除AutoConfiguration

@SpringBootApplication(exclude = {RedisAutoConfiguration.class})

排除configuration、bean

@ComponentScan(value = "com.wyh.common", excludeFilters = @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = {RedisConfiguration.class, RedisUtil.class}))

相关文章

网友评论

    本文标题:Springboot 排除不想加载的配置

    本文链接:https://www.haomeiwen.com/subject/jejtbctx.html