-
Notifications
You must be signed in to change notification settings - Fork 2.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
[SHIRO-890] Avoid another proxy creator when @EnableAspectJAutoProxy enabled #472
Conversation
@georgecao thanks for the PR! Is there a way to add a unit test to validate the fix? |
@fpapon Sure. Will come back when unit test is ready. |
@bdemers I formats the pom.xml by IntellIJ's project code style. Is there a code style guide that I missed? |
@georgecao thanks for the unit tests! |
@georgecao nope, I was just removing the white space to help reduce the diff to the lines needed. It helps when backporting too. Thanks for the patch!! |
Done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@georgecao Thank you very much for your contribution!
See #268 for the previous fix. But when
@EnableAspectJAutoProxy
enabled, spring actually creates an instance ofAnnotationAwareAspectJAutoProxyCreator
but notDefaultAdvisorAutoProxyCreator
. In this situation, there will be two proxy creators in the same context, which leads to methods be proxied twice also .The fix may just remove the type value of the
@ConditionalOnMissingBean
.