Skip to content

Commit

Permalink
解决Spring Boot环境下AOP二次代理问题
Browse files Browse the repository at this point in the history
  • Loading branch information
eryanwcp committed Nov 8, 2019
1 parent 0a081d5 commit a49446a
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public Advisor advisor(DruidStatProperties properties) {
}

@Bean
@ConditionalOnProperty(name = "spring.aop.auto",havingValue = "false")
public DefaultAdvisorAutoProxyCreator advisorAutoProxyCreator() {
DefaultAdvisorAutoProxyCreator advisorAutoProxyCreator = new DefaultAdvisorAutoProxyCreator();
advisorAutoProxyCreator.setProxyTargetClass(true);
Expand Down

1 comment on commit a49446a

@ahxClouds
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

springboot 2.7.3版本,druid 1.2.11版本
直接配置 aop-patterns,spring监控无效
要另外配置spring.aop.auto=false才行

Please sign in to comment.