Browse Source

Improve exception message in AopContext.currentProxy()

Closes gh-24321
pull/24332/head
lixiaolong11000 6 years ago committed by Sam Brannen
parent
commit
047eefd2e2
  1. 3
      spring-aop/src/main/java/org/springframework/aop/framework/AopContext.java

3
spring-aop/src/main/java/org/springframework/aop/framework/AopContext.java

@ -67,7 +67,8 @@ public final class AopContext { @@ -67,7 +67,8 @@ public final class AopContext {
Object proxy = currentProxy.get();
if (proxy == null) {
throw new IllegalStateException(
"Cannot find current proxy: Set 'exposeProxy' property on Advised to 'true' to make it available.");
"Cannot find current proxy: Set 'exposeProxy' property on Advised to 'true' to make it available. " +
"Also Check AopContext.currentProxy() invoke in the origin thread.");
}
return proxy;
}

Loading…
Cancel
Save