Provide a hook point that a Configuration class was skipped [SPR-17066] #21604
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: enhancement
A general enhancement
Milestone
Stéphane Nicoll opened SPR-17066 and commented
Spring Boot has a
ConditionEvaluationReport
that keeps track of conditions evaluations but can lead to wrong information as an important bit of information is not available.Consider the following example
As the condition is in the
REGISTER_BEAN
phase, the configuration class will be parsed and its import directive will be applied, parsingChild
in the process.If the condition doesn't match
TrackedConditionEvaluator
will figure out thatConfig
was excluded after all. As a resultChild
will not instantiated either. This process of figuring out that aREGISTER_BEAN
condition didn't match and therefore the class shouldn't be imported is internal to the framework and there is no way for Spring Boot to know.It would be nice to have a way to access this information. Ideally in a push model-like so that the report can update itself when the context realizes that a given class shouldn't be processed after all.
Affects: 4.3.18
The text was updated successfully, but these errors were encountered: