spring-projects / spring-projects/spring-framework

Consider allowing to exclude some beans from AOT processed applications

Open
#29,484 9 comments 0 reactions 1 assignee View on GitHub

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 BeanRegistrationAotProcessor then the isBeanExcludedFromAotProcessing result is considered.
  • If we want to filter a bean, we can use BeanRegistrationExcludeFilter in META-INF/spring/aot.factories.
  • For most other situations we use an if with AotDetector.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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.