-
Notifications
You must be signed in to change notification settings - Fork 38.2k
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
AspectJ CTW aspects executed twice #32970
Comments
Frankly, we did not expect such mixed AspectJ usage, at least not with the aspect exposed as a bean in the application context. I can see your scenario though. We'll try to make it work without breaking the original Micrometer use case - which is not trivial since AspectJ is trying to blur the lines between the different aspect types, suggesting |
It looks like we can simply skip target classes that have been compiled with |
This should be fixed in the upcoming 6.1.9 snapshot now. Please give it an early try, I hope it addresses your scenario as expected! |
I built some of the failing projects with 6.1.9-SNAPSHOT and it looks all good again. Thank you! |
Great to hear, thanks for the feedback! |
Affects: 6.1.7, 6.1.8
We experience AspectJ aspects to be executed twice since updating to Spring-Boot 3.2.6 with Spring-Framework 6.1.8.
The
@Aspect
classes are used with AspectJ-CTW viaaspectj-maven-plugin
and we initialize them as spring bean with@Bean
configuration.Now they are automatically falsely initialized as Spring-AOP cglib proxy additionally to the already existing bean.
This means that calls are going first through the proxy-aspect and then through the CTW-aspect.
We also use Spring-AOP proxies for other aspects in the same project, so we can't just completely disable the AOP autoconfig.
This seems to be caused by #32793
The text was updated successfully, but these errors were encountered: