Skip to content

Document that @Conditional on @Configuration affects component scanning [SPR-11579] #16203

@spring-projects-issues

Description

@spring-projects-issues

Rob P opened SPR-11579 and commented

Documentation for @Conditional says:

"If a @Configuration class is marked with @Conditional, all of the @Bean methods and @Import annotations associated with that class will be subject to the conditions."

My own experiments suggest that @ComponentScan is also subject to the conditions on the configuration bean. It would be helpful to document this as the only way I could be sure was to try it.


Affects: 4.0.2

Referenced from: commits 3aff973

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions