From 06346d36e8f4b854fd0bec13ff37bc3f67002256 Mon Sep 17 00:00:00 2001 From: wudi Date: Tue, 11 May 2021 11:11:34 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E6=89=A7=E8=A1=8C=E5=AE=8C?= =?UTF-8?q?=E6=AF=95=EF=BC=8C=E6=B2=A1=E6=9C=89=E8=BF=94=E5=9B=9E=E5=80=BC?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98~?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/ruoyi/aspect/Aspects.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/aspect/Aspects.java b/ruoyi-admin/src/main/java/com/ruoyi/aspect/Aspects.java index a0105e7f7..70a2d31aa 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/aspect/Aspects.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/aspect/Aspects.java @@ -38,9 +38,16 @@ public class Aspects { * @date 2021年5月10日 下午4:25:51 */ @Around("pointCut()") - public void around(ProceedingJoinPoint point) throws Throwable { + public Object around(ProceedingJoinPoint point) throws Throwable { System.out.println("========== 切面到l ======"); - point.proceed(); + try { + Object res = point.proceed(); + return res ; + } catch (Exception e) { + return e; + }finally { + System.out.println(" ====== 切面2over ===== "); + } } }