@conditional
时间: 2023-10-03 12:08:42 浏览: 95
@Conditional是一个来自于Spring框架的注解,它的作用是根据指定的条件来判断是否将一个Bean注册到容器中。该注解可以用在类或方法上,并且在Spring 4.0版本之后才引入。当使用@Conditional注解时,可以通过配置一些条件判断来决定是否处理被标注的目标对象。只有当所有条件都满足时,被@Conditional注解标注的目标对象才会被Spring容器处理。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [@Conditional注解详解](https://blog.csdn.net/weixin_43888891/article/details/127503336)[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^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [Spring系列第20篇:@Conditional通过条件来控制bean的注册](https://blog.csdn.net/likun557/article/details/105108901)[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^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文