You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think Adam means that you can't use @ComponentScan unless it's on a @Configuration class so the additional @Configuration annotation is somewhat unnecessary. We could add a @Configuration meta-annotation annotation to @ComponentScan so you can do this:
@ComponentScan// @Configuration (no longer required)public ....
This is somewhat along the lines of #15163 and could be addressed the same way: through extending the 'lite' candidate check in ConfigurationClassutils.isLiteConfigurationCandidate, just making the class-level annotations work but not implying @Configuration semantics.
Since we're doing this for @Import already (as per #15163), we should consider it for @ImportResource and @ComponentScan as well.
Uh oh!
There was an error while loading. Please reload this page.
Adam Berlin opened SPR-11769 and commented
Currently, If I need to use
@ComponentScan
I also need to use@Configuration
. I should not need to add both.Issue Links:
@Import
classes as lite@Configuration
@Bean
introspection between@Configuration
classes and 'lite' beansReferenced from: commits b4d447f
0 votes, 5 watchers
The text was updated successfully, but these errors were encountered: