fix Date and aopbug

This commit is contained in:
Looly
2020-03-26 12:05:26 +08:00
parent 8c9abbe3e3
commit 8bb73f3829
5 changed files with 54 additions and 21 deletions

View File

@@ -36,12 +36,13 @@ public class CglibInterceptor implements MethodInterceptor, Serializable {
@Override
public Object intercept(Object obj, Method method, Object[] args, MethodProxy proxy) throws Throwable {
final Object target = this.target;
Object result = null;
// 开始前回调
if (aspect.before(target, method, args)) {
try {
result = proxy.invokeSuper(obj, args);
// result = proxy.invokeSuper(obj, args);
result = proxy.invoke(target, args);
} catch (InvocationTargetException e) {
// 异常回调(只捕获业务代码导致的异常,而非反射导致的异常)
if (aspect.afterException(target, method, args, e.getTargetException())) {