Commit 805f09dc by huluobin

update

parent 3fb7f1c2
...@@ -83,11 +83,11 @@ public class LogAspect { ...@@ -83,11 +83,11 @@ public class LogAspect {
* 环绕通知 在方法的调用前、后执行 * 环绕通知 在方法的调用前、后执行
*/ */
@Around("point()") @Around("point()")
public Object doAround(ProceedingJoinPoint point) throws Throwable { public Object doAround(ProceedingJoinPoint joinPoint) throws Throwable {
//开始时间 //开始时间
long begin = System.currentTimeMillis(); long begin = System.currentTimeMillis();
//方法环绕proceed结果 //方法环绕proceed结果
Object obj = point.proceed(); Object obj = joinPoint.proceed();
//结束时间 //结束时间
long end = System.currentTimeMillis(); long end = System.currentTimeMillis();
//时间差 //时间差
...@@ -107,7 +107,7 @@ public class LogAspect { ...@@ -107,7 +107,7 @@ public class LogAspect {
Map<String, Object> params = new LinkedHashMap<>(10); Map<String, Object> params = new LinkedHashMap<>(10);
params.put("uri", request.getRequestURI()); // 获取请求的url params.put("uri", request.getRequestURI()); // 获取请求的url
//params.put( "method", request.getMethod() ); // 获取请求的方式 //params.put( "method", request.getMethod() ); // 获取请求的方式
params.put("args", point.getArgs()); // 请求参数 params.put("args", joinPoint.getArgs()); // 请求参数
//params.put( "className", joinPoint.getSignature().getDeclaringTypeName() + "." + joinPoint.getSignature().getName() ); // 获取类名和获取类方法 //params.put( "className", joinPoint.getSignature().getDeclaringTypeName() + "." + joinPoint.getSignature().getName() ); // 获取类名和获取类方法
params.put("ip", getClientIp(request)); // 获取请求的ip地址 params.put("ip", getClientIp(request)); // 获取请求的ip地址
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment