-
Notifications
You must be signed in to change notification settings - Fork 38.4k
Add bean definition attribute for ConfigurationClassPostProcessor to skip "lite" bean detection [SPR-17412] #21945
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Dave Syer commented It's a little bit more complicated than just adding a bean definition attribute because UPDATE: that check is already in place up to a point (it only processes member classes inside if (configClass.getMetadata().isAnnotated(Component.class.getName())) {
// Recursively process any member (nested) classes first
processMemberClasses(configClass, sourceClass);
} That doesn't prevent the "lite" check being applied to member classes of |
Dave Syer commented A further complication is that |
Dave Syer commented Here's what such a change could look like: dsyer@c16a298. It works for me, in the sense that it cuts out 99% of I can make that into a pull request if you want. I expect you have other better ideas though. |
It looks like this will be covered by our programmatic annotation exclusion facilities where certain bean classes can be registered as non-annotated, or only annotated with specific annotations. All of our common annotation introspection algorithms use a central |
Dave Syer opened SPR-17412 and commented
ConfigurationClassPostProcessor
does a lot of wheel spinning, even in an app with zero@Configuration
classes. If there was a bean definition attribute that told it "don't analyze this class" we could short circuit a lot of that processing in a higher level tool (e.g. in Spring Boot).Affects: 5.1.1
Issue Links:
@Bean
introspection between@Configuration
classes and 'lite' beans1 votes, 2 watchers
The text was updated successfully, but these errors were encountered: