[SPR-10964] Port @ConditionalOn... from Spring Boot into Spring Core Created: 07/Oct/13 Updated: 15/Jan/19
|Affects Version/s:||4.0 M3|
|Fix Version/s:||5.x Backlog|
|Reporter:||Eberhard Wolff||Assignee:||Stéphane Nicoll|
|Remaining Estimate:||Not Specified|
|Time Spent:||Not Specified|
|Original Estimate:||Not Specified|
|Days since last comment:||27 weeks ago|
|Last commented by a User:||true|
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.
|Comment by Phil Webb [ 11/Oct/13 ]|
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 by Spring Issuemaster [ 14/Jan/19 ]|