解决执行完毕,没有返回值的问题~

This commit is contained in:
wudi 2021-05-11 11:11:34 +08:00
parent 6d767daf9e
commit 06346d36e8
1 changed files with 9 additions and 2 deletions

View File

@ -38,9 +38,16 @@ public class Aspects {
* @date 2021年5月10日 下午4:25:51 * @date 2021年5月10日 下午4:25:51
*/ */
@Around("pointCut()") @Around("pointCut()")
public void around(ProceedingJoinPoint point) throws Throwable { public Object around(ProceedingJoinPoint point) throws Throwable {
System.out.println("========== 切面到l ======"); System.out.println("========== 切面到l ======");
point.proceed(); try {
Object res = point.proceed();
return res ;
} catch (Exception e) {
return e;
}finally {
System.out.println(" ====== 切面2over ===== ");
}
} }
} }