mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
1、切面after切点,将目标方法执行返回值,开放给切点
This commit is contained in:
parent
c32e8d9b55
commit
34cc3dcb57
@ -6,6 +6,7 @@ import java.lang.reflect.Method;
|
|||||||
* 切面接口
|
* 切面接口
|
||||||
*
|
*
|
||||||
* @author looly
|
* @author looly
|
||||||
|
* @author ted.L
|
||||||
* @since 4.18
|
* @since 4.18
|
||||||
*/
|
*/
|
||||||
public interface Aspect{
|
public interface Aspect{
|
||||||
|
@ -52,7 +52,7 @@ public class CglibInterceptor implements MethodInterceptor, Serializable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (aspect.after(target, method, args)) {
|
if (aspect.after(target, method, args, result)) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
@ -53,7 +53,7 @@ public class JdkInterceptor implements InvocationHandler, Serializable{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (aspect.after(target, method, args)) {
|
if (aspect.after(target, method, args, result)) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user