spring-cloud / spring-cloud/spring-cloud-commons

Throw hard failure with config first bootstrap mode during AOT processing

Open
#1,186 2 comments 5 reactions 1 assignee View on GitHub

@OlgaMaciaszek is already working on this.

Since Jan 6, 2023.

enhancement
Dominant language
Java
Stars
751
Forks
744
Avg merge
1d 14h
Merged PRs (30d)
9

Description

When an application uses config first bootstrap (by configuring spring.config.use-legacy-processing=true or using the spring-cloud-starter-bootstrap dependency), AOT processing is not supported.

While this limitation is documented, an application that transitively depends on the starter will see the following behavior:

  • AOT processing succeeds and generates source files
  • the application fails at startup both in native and JVM modes, as bean definitions for the application and auto-configurations were not parsed.

Adding an AOT processor in the starter (and declaring it in aot.factories) that throws a hard failure during AOT processing, describing the problem, could help diagnose such issues.

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.