> For the complete documentation index, see [llms.txt](https://jack80342.gitbook.io/spring-boot/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jack80342.gitbook.io/spring-boot/iv.-spring-boot-features/46.-creating-your-own-auto-configuration/46.3-condition-annotations/46.3.3-property-conditions.md).

# 46.3.3 Property条件

`@ConditionalOnProperty`注解可以根据一个Spring `Environment`属性来决定是否包含配置，使用`prefix`和`name`属性指定要检查的配置。默认情况下，任何存在的只要不是`false`的属性都会匹配，你也可以使用`havingValue`和`matchIfMissing`属性创建更高级的检测。
