As suggested in https://github.com/spring-projects/spring-boot/issues/15578#issuecomment-1226607873, we have information in the reference docs that would also be beneficial in the javadoc
Comment From: bondolo
Thank you! This is a great improvement. It will still probably be mysterious for users when they encounter the failure after innocently putting @ConditionalOnClass on a @Bean but the javadoc now adequately explains the problem and a remedy!
Comment From: vpavic
Suggestion for 2.7+: wouldn't it be a good idea to also refer to @AutoConfiguration here, since that's what one would use on something like MyAutoConfiguration these days?
Comment From: philwebb
Good spot @vpavic, I've now fixed that.