spring-projects / spring-projects/spring-framework
Add API to customize features of Spring AOT
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 60.2k
- Forks
- 38.8k
- Avg merge
- 5d 2h
- Merged PRs (30d)
- 27
Description
Thus far, Spring AOT is this one thing that does refresh the context, invokes contributors and then dump the state of the BeanFactory in generated code. It also write additional files such as native metadata.
We want to provide more flexibility in what Spring AOT does.
This issue is about researching what this API could look like with the following customizations hookpoint:
- Lock down the bean factory (current behavior)
- Record classpath scanning outcome and make it available at runtime (*)
- Create CGLIB proxies
- Process Runtime Hints
- Write Runtime Hints as GraalVM metadata (**)
(*) should not be done if the bean factory is locked down. Similarly, writing runtime hints can't be enabled if they aren't processed. This shows that there are features that can't be individual options and rather needs to be linked to something else.
Such feature is linked to additional processing that happens in ApplicationContextAotGenerator. It may be a new PostProcessor, but it could also be something that needs to be enabled as part of GenericApplication#refreshForAotProcessing.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading ApplicationContextAotGenerator and GenericApplication#refreshForAotProcessing to understand the existing AOT processing flow. Map the proposed customization points and their dependencies, including the bean-factory lock and runtime-hints constraints. Done means documenting a viable API design and the required processing relationships.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- backend, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100