日志打印 避免回填
This commit is contained in:
@@ -35,11 +35,14 @@ public class AppApiMethodAspect {
|
|||||||
@Around("pkg()")
|
@Around("pkg()")
|
||||||
public Object around(ProceedingJoinPoint pjp) throws Throwable {
|
public Object around(ProceedingJoinPoint pjp) throws Throwable {
|
||||||
long start = System.currentTimeMillis();
|
long start = System.currentTimeMillis();
|
||||||
// 执行被拦截的方法
|
//避免回填
|
||||||
Object result = pjp.proceed();
|
|
||||||
//请求的参数
|
|
||||||
Object[] args = pjp.getArgs();
|
Object[] args = pjp.getArgs();
|
||||||
String params = new Gson().toJson(args);
|
String params = new Gson().toJson(args);
|
||||||
|
|
||||||
|
// 执行被拦截的方法
|
||||||
|
Object result = pjp.proceed();
|
||||||
|
|
||||||
|
//请求的参数
|
||||||
String resultJson = new Gson().toJson(result);
|
String resultJson = new Gson().toJson(result);
|
||||||
|
|
||||||
HttpServletRequest request = HttpContextUtils.getHttpServletRequest();
|
HttpServletRequest request = HttpContextUtils.getHttpServletRequest();
|
||||||
|
|||||||
Reference in New Issue
Block a user