conditionalonproperty
时间: 2023-09-10 19:14:09 浏览: 110
@ConditionalOnProperty是Spring Boot中的一个条件注解之一,用于根据配置文件中的属性值来判断是否满足条件从而决定某个Bean或配置类是否生效。该注解可以通过配置文件中的属性值与给定的值进行比较,如果相等则生效,否则失效。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [SpringBoot教程(7) @ConditionalOnProperty 详细讲解和示例](https://blog.csdn.net/winterking3/article/details/114822929)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* [SpringBoot - @ConditionalOnProperty注解使用详解](https://blog.csdn.net/goodjava2007/article/details/125536719)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文