Skip to content

Commit 047eefd

Browse files
lixiaolong11000sbrannen
authored andcommitted
Improve exception message in AopContext.currentProxy()
Closes gh-24321
1 parent b0e4b7e commit 047eefd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ public static Object currentProxy() throws IllegalStateException {
6767
Object proxy = currentProxy.get();
6868
if (proxy == null) {
6969
throw new IllegalStateException(
70-
"Cannot find current proxy: Set 'exposeProxy' property on Advised to 'true' to make it available.");
70+
"Cannot find current proxy: Set 'exposeProxy' property on Advised to 'true' to make it available. " +
71+
"Also Check AopContext.currentProxy() invoke in the origin thread.");
7172
}
7273
return proxy;
7374
}

0 commit comments

Comments
 (0)