-
Notifications
You must be signed in to change notification settings - Fork 41.1k
AspectJ Support for GraalVM Native Images #33865
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
Comments
Unfortunately, aspects are not fully supported on native yet. See spring-projects/spring-framework#28711 and spring-projects/spring-framework#29765 for details. Spring Framework 6.0.4 contains spring-projects/spring-framework#29519, which improves things a lot. Please give this problem of yours with the next Spring Boot version (3.0.2) a try when it's released. Hopefully it then works. |
Hello @mhalbritter , thanks for quickly reply! Have updated to Spring Boot 3.0.2 and aspect stills not triggered. Should additionals configurations (properties, hints etc) should be added as a result to have it working or do we need to wait an enhancement by Spring team to work on it (if so, do we have a release that it will be working)? Best regards! |
spring-projects/spring-framework#28711 is still open, and I guess this is the main reason for it not working. I don't have an estimate in which release this will land, sorry. You can try to use the workaround from the linked ticket: spring-projects/spring-framework#28711 (comment) |
This is planned to be fixed in Spring Framework |
Boot 3.0.3 is planned for February 23, 2023. |
Spring Boot 3.0.3 and aspect stills not triggered |
@wghdir Please read the comments above yours and the issues to which they link. spring-projects/spring-framework#28711 is the issue that will fix this. Unfortunately, it did not make it into Framework 6.0.5 and remains open. |
Still appears aspects not triggered in Spring Boot 3.0.6 |
@SammieAra Please see the comments above that reference the Spring Framework issue spring-projects/spring-framework#28711. That Framework issue is still open, so It is expected that it's still not working with newer Spring Boot releases. |
Hello!
Have a query regarding Spring AOP Native support.
I have the following aspect:
Which should be triggered once a controller method is annotated by
Log
, as follows:Interface:
Controller:
The aspect
LogAspect
is triggered successfully non native.However if I build this application natively
mvn -Pnative spring-boot:build-image
, the image is built and run successfully however the aspect is not triggered. Is there any additional configuration to be done?Also tried create a class which implements
RuntimeHintsRegistrar
forLog
annotation interface andLogAspect
as a result to register proxy interface andLogAspect
constructor and methods, but still no success.pom.xml
:Thanks in advance.
The text was updated successfully, but these errors were encountered: