Skip to content
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

Offer compile time support for @Configuration classes [SPR-15512] #20071

Closed
spring-projects-issues opened this issue May 4, 2017 · 2 comments
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) status: duplicate A duplicate of another issue type: enhancement A general enhancement

Comments

@spring-projects-issues
Copy link
Collaborator

Phil Webb opened SPR-15512 and commented

During some discussion on the Spring Boot call about this issue we discussed the benefits of not needing to use CGLib for configuration classes.

A typical Spring Boot application will load 50-70 configurations and each one needs bytecode generation and increases the amount of memory used.

One option that Stephane suggested was to do the bytecode manipulation an compile time rather than runtime. We could possibly use an annotation processor to rewrite the methods and call some common SPI that both ConfigurationClassEnhancer and us could share.


0 votes, 6 watchers

@spring-projects-issues
Copy link
Collaborator Author

Phil Webb commented

One other thought about this. We'd need to ensure that debugging works correctly. We don't want line numbers changing.

@spring-projects-issues spring-projects-issues added type: enhancement A general enhancement in: core Issues in core modules (aop, beans, core, context, expression) labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 5.x Backlog milestone Jan 11, 2019
@bclozel bclozel added the status: duplicate A duplicate of another issue label Jun 17, 2022
@bclozel bclozel removed this from the 6.x Backlog milestone Jun 17, 2022
@bclozel
Copy link
Member

bclozel commented Jun 17, 2022

Closing as a duplicate of #28065.
In the meantime, we've decided to perform @Configuration classes analysis during the AOT phase and generate Java sources that describe the state of the resulting bean factory.

@bclozel bclozel closed this as not planned Won't fix, can't repro, duplicate, stale Jun 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) status: duplicate A duplicate of another issue type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

3 participants