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
The scenario I face is that I have some configuration stored in a specific Git repository, which is used by the application. For performances reasons (JGit usage seems rather slow) , the idea is to perform a first find at startup then use a cache/refresh technique later on.
When using an InitializingBean, the application startup fails with a
What happens is that the CGLIB proxy that we create for the EnhancedConfiguration tries to call the setBeanFactory method even though this method is not defined on the actual class.
Alright, we found some application context destruction callback weirdness as the findOne your afterPropertiesSet method actually starts a context and closes it with PropertyPlaceholderAutoConfiguration. This has a (unwanted) impact on the PropertyPlaceholderAutoConfiguration instance of the "main" context. Juergen and I did some digging and we found a way to fix that. Trying it now.
It turns out that the static registration/cleanup arrangement for the CGLIB interceptors were flawed in a specific use case (the findOne method is actually creating a context and disposing it and this had side effect on the main context as this one done in a afterPropertiesSet method).
Your sample application now works fine against master. Thanks for the report!
Thomas Demande opened SPR-12445 and commented
Cf GitHub sample project referenced in the Reference URL.
The scenario I face is that I have some configuration stored in a specific Git repository, which is used by the application. For performances reasons (JGit usage seems rather slow) , the idea is to perform a first find at startup then use a cache/refresh technique later on.
When using an InitializingBean, the application startup fails with a
It can easily be reproduced by launching
mvn spring-boot:run
in the GitHub sample.Affects: 4.1.2
Reference URL: https://github.com/tdemande/spring-config-server
Referenced from: commits c1f1cac
The text was updated successfully, but these errors were encountered: