forked from spring-projects/spring-framework
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support load-time weaving for @component classes again
Since Spring Framework 5.2, the LoadTimeWeaver no longer weaves bean classes annotated with @component. This is a regression caused by the changes in 40c6213, stemming from the fact that any class annotated or meta-annotated with @component is considered to be a candidate configuration class in 'configuration lite' mode (i.e., a class without the @configuration annotation and without any @bean methods) and therefore now has its class eagerly loaded. This results in the class being loaded before the LoadTimeWeaver has a chance to weave it. This commit fixes this regression by explicitly avoiding eager class loading for any 'lite' @configuration or @component class without @bean methods. Closes spring-projectsgh-26199
- Loading branch information
Showing
2 changed files
with
24 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters