Adopt a spring boot Condition [SPR-16065] #20614
I would like to propose that some or all of the implementations of org.springframework.context.annotation.Condition
These are conditions that would add nice value to the spring core framework.
Currently I have only three options, none of which I like, which are:
The reasons why I don't like these options are:
It looks like the package org.springframework.boot.autoconfigure.condition would be a good candidate for a separate module.
I've also created a JIRA issue in the spring boot project for this. (See issue Create a separate module for generic conditions)
Ideally though I think these implementations would sit better in spring core or perhaps a new module along the lines of spring core autoconfigure or spring core condition.
Affects: 4.3.12, 5.0 GA
Brian Clozel commented
While some conditions could be considered for Spring Framework, quite a few of those depend on opinions and constraints held in Spring Boot. We can't enforce those in all Spring Framework applications, so such Conditions could come with some important limitations.
While I agree option 1) isn't wise, 2) wouldn't work anyway because of those limitations. Now if you make the appropriate changes to your application to make it work anyway, turning your app in a Spring Boot app would only mean deleting configuration and refactoring a bit your build file. You'd achieve 3).
Phil's comment just gives one example of that. Conditions like
Please comment/subscribe on the other issues.
pas filip commented
I understand the concerns for not migrating all of the conditions although in the proposal I made I singled out the condtions that don't have any of these issues.