-
Notifications
You must be signed in to change notification settings - Fork 40.8k
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
DatabaseInitializationDependencyConfigurer triggers eager initialization of factory beans #28977
Comments
demo-issue28977.zip When downgrading to SB 2.4 : both apps are working |
This branch contains a fix for this issue. If spring-projects/spring-framework#27796 provides a method to find an annotation without initializing factory beans some of the changes will no longer be necessary. |
@wilkinsona : thanks, i'll wait 2.5.8 SB release to pick up the fix and delay my upgrade :) |
@laurentschoelens thanks for the sample. I was able to build it with the latest change and it is working as expected now. |
Thanks @snicoll |
I've got a problem from migrating from SB 2.3 to 2.5 branch.
When having a Database with Spring-jdbc in my java applications, CXF JAX-WS clients being initialized with XML config were stopped working since address being populated with the ${placeholder} instead of real value defined in properties.
For me, this is caused by DatabaseInitializationDependencyConfigurer.
It gets all DependsOnDatabaseInitializationDetector and the AnnotationDependsOnDatabaseInitializationDetector is causing eagerInit called before properties are parsed.
--> second param allowFactoryBeanInit is true here
Currently under Java 8 using SpringBoot 2.5.7.
Could you please provide a fix for this ?
Making XML Config to Java Config gives me a workaroung but not a real solution to fix this regression.
Overring SpringBoot
DatabaseInitializationDependencyConfigurer
with empty class also fixes the problem.I've managed to create a simple example of this issue, I'll send it very soon.
Thanks in advance
The text was updated successfully, but these errors were encountered: