-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
Transactional annotation breaks AOT for native image #14825
Comments
Hi @nnl-1, thanks for the report. Have you confirmed that the same code works with Spring Security 6.2.2? |
Hi @marcusdacoregio, no, it doesn't work in 6.2.2 either. |
Hi @nnl-1. Do you mind elaborating on why do you need the The error is thrown by this line on the Spring Authorization Server project, where it tries to autowire dependencies into the |
@marcusdacoregio well, I'm saving some info about logged user into DB. I could switch to TransactionTemplate of course but the annotation is more convenient. |
Thanks, I am looking into this. I suspect that we will have to tweak the |
Thanks, @nnl-1. This has now been fixed as I described in my previous comment. The snapshots should be published in a few minutes, it would be great if you could test them and report back. |
Latest Spring Security 6.2.3 breaks AOT for native image (I've been asked to recreate this issue here).
Config:
If I uncomment Transactional annotation in CheckRolesLdapAuthenticationProvider (see reproducer) I got the following:
Full log: aot-error.log
There are 2 classes generated CheckRolesLdapAuthenticationProvider$$SpringCGLIB$$0 and CheckRolesLdapAuthenticationProvider$$SpringCGLIB$$1 which we could find in both reflection-config.json/predefined-classes-config.json which I suppose is wrong.
There is no error without Transactional.
Reproducer: https://github.com/nnl-1/SpringBoot3AotTransactionalReproducer
Thank you!
The text was updated successfully, but these errors were encountered: