Eberhard Wolff opened SPR-10964 and commented

Spring Boot provides many useful Conditional such as @ConditionalOnMissingBean, @ConditionalOnClass etc This should really be in the core framework. It would allow to detect the runtime environment (Java EE server? Which Java EE server?) and tweak the configuration accordingly.


Affects: 4.0 M3

Issue Links: - #20614 Adopt a spring boot Condition ("is duplicated by") - #15920 Include @ConditionalOnMissingBean and @ConditionalOnClass from Spring Boot

7 votes, 11 watchers

Comment From: spring-projects-issues

Phil Webb commented

We decided to intentionally leave the majority of the @Conditional implementations in Spring Boot for now whilst we develop them. The @ConditionalOnMissingBean can be particularly problematic as it depends on the order that bean definitions get evaluated. For Spring Boot this is not a problem because we only use it for auto-configuration beans (which are always evaluated last), for user applications it might introduce some very hard to track down bugs.

Comment From: sdeleuze

I think this issue and #15920 are duplicated, I propose to keep the later since the description echoes to concerns I have as well.