-
Notifications
You must be signed in to change notification settings - Fork 38.3k
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
Replace ApplicationContextAotInitializer with an AotApplicationContextInitializer interface #29157
Comments
Thanks for the suggestion. This class is meant to be used by consumers of AOT, Spring Boot being one of them but we anticipate any custom framework built on top of Spring Framework to find it useful as well. I can see that the use in Spring Boot has been replaced by Shouldn't this be the other way around, with |
That's an alternative. I wanted to get the test support into Spring Boot without derailing the Spring Framework release. We need a way for the test code to plug in an |
I don't think I've understood that but I believe that general entry points should be provided by framework so that custom framework should build upon them the same way Spring Boot does. I've also created #29181 to move/refactor the current |
Replace the `ApplicationContextAotInitializer` class with an `AotApplicationContextInitializer` interface so that its use can be detected using a simple `instanceof` check. The existing functionality has been moved to a factory method on the interface allowing: `new ApplicationContextAotInitializer() .initialize(context, names);` To now be written as: `AotApplicationContextInitializer.forInitializerClasses(names) .initialize(context);` See gh-29157
I've pushed a new |
Cool. I like it. |
Spring Boot recently introduced
AotApplicationContextInitializer
to aid with AOT testing support. This class replaces the need to callorg.springframework.context.aot.ApplicationContextAotInitializer
from Spring Boot.If we're the only consumer, then the Framework class could potentially be dropped.
The text was updated successfully, but these errors were encountered: