From 6771ad1d258523848e7654a89d8fd31b99a9f43c Mon Sep 17 00:00:00 2001 From: wangw <1594593906@qq.com> Date: Mon, 9 Dec 2024 15:38:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A5=E5=BF=97=E6=89=93=E5=8D=B0=20?= =?UTF-8?q?=E9=81=BF=E5=85=8D=E5=9B=9E=E5=A1=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/sqx/common/aspect/AppApiMethodAspect.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/sqx/common/aspect/AppApiMethodAspect.java b/src/main/java/com/sqx/common/aspect/AppApiMethodAspect.java index 5151fe4a..488f7f7b 100644 --- a/src/main/java/com/sqx/common/aspect/AppApiMethodAspect.java +++ b/src/main/java/com/sqx/common/aspect/AppApiMethodAspect.java @@ -35,11 +35,14 @@ public class AppApiMethodAspect { @Around("pkg()") public Object around(ProceedingJoinPoint pjp) throws Throwable { long start = System.currentTimeMillis(); - // 执行被拦截的方法 - Object result = pjp.proceed(); - //请求的参数 + //避免回填 Object[] args = pjp.getArgs(); String params = new Gson().toJson(args); + + // 执行被拦截的方法 + Object result = pjp.proceed(); + + //请求的参数 String resultJson = new Gson().toJson(result); HttpServletRequest request = HttpContextUtils.getHttpServletRequest();