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

Throw hard failure with config first bootstrap mode during AOT processing #1186

Open
bclozel opened this issue Jan 6, 2023 · 2 comments
Open
Assignees
Milestone

Comments

@bclozel
Copy link
Contributor

bclozel commented Jan 6, 2023

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.

@PorcoRosso5
Copy link

I have same problem: spring-cloud-starter-bootstrap dependency make my application build broke

@OlgaMaciaszek
Copy link
Collaborator

@PorcoRosso5 as indicated above and as documented, this is not supported. This issue is only here to add a straightforward exception when someone tries to process an app with bootstrap with AOT.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

5 participants