Fix #28771

  • added a note on using beans in @ConditionalOnExpression in the Javadoc and .adoc

Comment From: snicoll

@mihailcornescu thank you for making your first contribution to Spring Boot.