-
Notifications
You must be signed in to change notification settings - Fork 706
Spring Boot support: use annotation processor org.springframework.boot.autoconfigureprocessor.AutoConfigureAnnotationProcessor in builds #377
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
Reading through Sounds like we just need to add
to our POMs |
@ryanjbaxter that's the annotation processor generating configuration keys metadata. What @YannCebron means is the annotation processor that generates metadata on auto-configuration so that we don't have to load/parse the class at runtime. The correct dependency is <dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure-processor</artifactId>
<optional>true</optional>
</dependency> It should be added in any project that has a |
I've added a note to the ref guide as well. |
@snicoll thanks. We will try this for Finchley. |
@snicoll when I added this to spring-cloud-netflix it looks like it generated a file called |
Thanks for the feedback. I made a typo and will fix the doc. Thank you! |
@snicoll would anything go wrong if this dependency was present and there was no |
No, it will generate metadata for the |
It seems Spring Cloud is currently not using above AP which generates additional metadata in
META-INF/spring-autoconfigure-metadata.properties
, storing a number of annotations/attributes for auto-configuration classes.This information can be used both by Spring Boot to avoid classloading on startup by reading this metadata instead of loading/inspecting annotations of all autoconfiguration classes.
Furthermore, this metadata is already used by tools (e.g. IntelliJ IDEA's Spring support) to achieve a similar goal.
Given the large total # of autoconfiguration classes across all Spring Cloud -* projects, this seems a worthwhile step to improve performance.
PS: I'm unsure whether this is the correct subproject, but obviously it should be applied across all Spring Cloud projects providing autoconfiguration classes.
The text was updated successfully, but these errors were encountered: