查看“Spring Boot 常见注解”的源代码
←
Spring Boot 常见注解
跳到导航
跳到搜索
因为以下原因,您没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看和复制此页面的源代码。
=== @SpringBootApplication === spring-boot-autoconfigure-x.x.x.RELEASE.jar === @Bean === spring-context-x.x.x.jar 中的注解 https://docs.spring.io/spring-javaconfig/docs/1.0.0.M4/reference/html/ch02s02.html @Bean 是一个方法级注释,是 XML <bean/> 元素的直接模拟。 === @Conditional === spring-context-x.x.x.jar 中的注解 https://docs.spring.io/spring-framework/docs/5.3.1/javadoc-api/ 表示组件只有在所有指定条件都匹配时才有资格注册。 可以是 bean 从定义到注册之前以编程方式确定的任何状态。 如果 @Configuration 类标有 @Conditional,则与该类关联的所有@Bean 方法、@Import 注释和@ComponentScan 注释都将受制于条件。 === @ConditionalOnClass === https://docs.spring.io/spring-boot/docs/2.0.1.RELEASE/api/index.html?org/springframework/boot/autoconfigure/condition/ConditionalOnClass.html 只有当指定的类在类路径上时才匹配。 === @ConditionalOnMissingBean === https://docs.spring.io/spring-boot/docs/2.0.1.RELEASE/api/index.html?org/springframework/boot/autoconfigure/condition/ConditionalOnMissingBean.html 仅当指定的 bean 类和/或名称尚未包含在 BeanFactory 中时才匹配。 === @ConditionalOnProperty === https://docs.spring.io/spring-boot/docs/2.0.1.RELEASE/api/index.html?org/springframework/boot/autoconfigure/condition/ConditionalOnMissingBean.html 条件检查指定的属性是否具有特定值。 默认情况下,属性必须存在于环境中并且不等于 false。 havingValue() 和 matchIfMissing() 属性允许进一步定制。
返回至
Spring Boot 常见注解
。
导航菜单
个人工具
登录
名字空间
页面
讨论
变种
视图
阅读
查看源代码
查看历史
更多
搜索
导航
首页
Spring Boot 2 零基础入门
Spring Cloud
Spring Boot
设计模式之禅
VUE
Vuex
Maven
算法
技能树
Wireshark
IntelliJ IDEA
ElasticSearch
VirtualBox
软考
正则表达式
程序员精讲
软件设计师精讲
初级程序员 历年真题
C
SQL
Java
FFmpeg
Redis
Kafka
MySQL
Spring
Docker
JMeter
Apache
Linux
Windows
Git
ZooKeeper
设计模式
Python
MyBatis
软件
数学
PHP
IntelliJ IDEA
CS基础知识
网络
项目
未分类
MediaWiki
镜像
问题
健身
国债
英语
烹饪
常见术语
MediaWiki帮助
工具
链入页面
相关更改
特殊页面
页面信息