摘要: Spring boot 中有时候需要控制配置类是否生效,使用 @ConditionalOnProperty 注解来控制 @Bean 是否生效。 例: @ConditionalOnProperty(prefix = "config",name = "enable",havingValue = "tru 阅读全文
posted @ 2021-03-16 19:52 currentTimeMillis 阅读(843) 评论(0) 推荐(0) 编辑