-
Notifications
You must be signed in to change notification settings - Fork 38.1k
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
Cglib proxies created by MvcUriComponentsBuilder should be processed at build-time #29500
Comments
Can you provide the full stack trace? Also, have you tried this with Spring Framework 6.0.0 (GA)? |
I updated everything to spring boot 3-SNAPSHOT which pulls in 6.0.0. Still get the same error. Full stacktrace is
|
Please give me a minute, I'll try to set up a reproducible example. |
That was a ride. I found that the failing proxy starts to be generated as soon as I have starter-hateoas on the classpath. Please have a quick look at https://github.com/eiswind/mvcuri-native where both failures are reproducible. I did not find a way to register a cglib proxy manually yet. Is there one? |
So, the non-HATEOAS arrangement basically stumbles over the fact that the controller class and the return type of the dummy method invocation need to be proxied, and no CGLib proxy classes have been registered for these types. I guess that's due to Spring MVC not yet providing any facilities to do that. In the HATEOAS-world we have an AOT extension for I guess we'll have to consult the AOT team to avoid such conflicting proxy declarations. |
MvcUriComponentsBuilder
fails with AOT-generated proxy
MvcUriComponentsBuilder
fails with AOT-generated proxyMvcUriComponentsBuilder
should be processed at build-time
@eiswind thanks for the report. The problem is that those proxies should be generated at build-time and the code in the middle of that controller method cannot be introspected. I've tried to trigger the creation of the proxy at build-time but this lead to:
At this stage, I don't know how this can be improved. We'll have to investigate. |
MvcUriComponentsBuilder
should be processed at build-time
Affects: 6.0.0
I have a simple controller that goes like
With AOT generating the proxy for the controller this fails with:
Please let me know if I can provide any further help with this.
Please forgive: I am not sure where to file this issue as it goes with AOT.
The text was updated successfully, but these errors were encountered: