> 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.6-spel-expression-conditions.md).

# 46.3.6 SpEL表达式条件

`@ConditionalOnExpression`注解可以根据[SpEL表达式](https://docs.spring.io/spring/docs/5.0.4.RELEASE/spring-framework-reference/core.html#expressions)结果来决定是否包含配置。
