spring-projects / spring-projects/spring-framework
Consider allowing to exclude some beans from AOT processed applications
Open
Nobody has claimed this yet.
status: pending-design-work
theme: aot
type: enhancement
- Dominant language
- Java
- Stars
- 60.2k
- Forks
- 38.8k
- Avg merge
- 5d 2h
- Merged PRs (30d)
- 27
Description
See https://github.com/spring-projects/spring-boot/issues/32262 for background.
Currently we have a number of areas where we want to exclude beans from being used in AOT processed applications. There are a number of ways we currently do this.
- If a bean implements
BeanRegistrationAotProcessorthen theisBeanExcludedFromAotProcessingresult is considered. - If we want to filter a bean, we can use
BeanRegistrationExcludeFilterinMETA-INF/spring/aot.factories. - For most other situations we use an
ifwithAotDetector.useGeneratedArtifacts()in the actual code.
It would be nice if we could review these existing usages and see if we can find a common way to perform exclusions.
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.
Assessment
This issue has not been assessed yet.