-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Gateway Server MVC support for AOT #3171
Comments
I managed to workaround - so I can run my Gateway app as native image again - by
I can offer to improve on this solution (configure the requestScope toggle) and send a Pull Request - if there is interest. |
A PR would be most welcome! /cc @joshlong |
I love this ! |
@spencergibb @joshlong |
EDIT:
Let me add, that this "bug" (or better use of an for AOT unsupported bean definition method) presently prevents ANY Spring Boot app using
spring-cloud-gateway-server-mvc
from being run as a native image - as any will need to instantiate the beans during AutoConfiguration...Describe the bug
Spring Cloud Gateway 4.1.0 release (2023.0.0 train) based Spring Boot app - using new gateway-server-mvc - with minimal path-predicate routing to webservice apps, CRASHES in Gradle's processAot task on application startup with (shortened)
stack-trace as shown below. Running the app (JVM w/o AOT) works fine.
Same in integration testing ("solved" with @DisabledInAotMode)
Sample
Code for above mentioned app is publicly accessible at https://github.com/wisskirchenj/gateway/tree/spring-issue-ref, where I stripped off all non-essential features in this branch for reference.
The text was updated successfully, but these errors were encountered: