We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
问题参考 #2770 个人分析:这是由于Spring Boot 默认配置造成的:spring.aop.auto=true (等同于@EnableAspectJAutoProxy)。 这个与DefaultAdvisorAutoProxyCreator的再次注入有冲突。 这个bug不仅会导致aop的统计有问题,而且可能还会导致事务的两次代理,等等。
个人实践,添加以下代码即可解决:(如有其它方法,请指出!) com.alibaba.druid.spring.boot.autoconfigure.stat.DruidSpringAopConfiguration
@ConditionalOnProperty(name = "spring.aop.auto",havingValue = "false")
@Bean @ConditionalOnProperty(name = "spring.aop.auto",havingValue = "false") public DefaultAdvisorAutoProxyCreator advisorAutoProxyCreator() { DefaultAdvisorAutoProxyCreator advisorAutoProxyCreator = new DefaultAdvisorAutoProxyCreator(); advisorAutoProxyCreator.setProxyTargetClass(true); return advisorAutoProxyCreator; }
The text was updated successfully, but these errors were encountered:
这个问题除了不加aop-patterns与改源码外,还有什么解决方案么,现在升级spring boot 2.1.5以上版本后,二次代理会导致 存在循环依赖的 服务无法启动,有类似问题解决方案否(别说改掉循环依赖),谢谢
Sorry, something went wrong.
DefaultAdvisorAutoProxyCreator
Successfully merging a pull request may close this issue.
问题参考 #2770
个人分析:这是由于Spring Boot 默认配置造成的:spring.aop.auto=true (等同于@EnableAspectJAutoProxy)。
这个与DefaultAdvisorAutoProxyCreator的再次注入有冲突。
这个bug不仅会导致aop的统计有问题,而且可能还会导致事务的两次代理,等等。
个人实践,添加以下代码即可解决:(如有其它方法,请指出!)
com.alibaba.druid.spring.boot.autoconfigure.stat.DruidSpringAopConfiguration
@ConditionalOnProperty(name = "spring.aop.auto",havingValue = "false")
The text was updated successfully, but these errors were encountered: