From 76fed440a860292976c86a701a13971690aac014 Mon Sep 17 00:00:00 2001 From: macro Date: Sun, 11 Apr 2021 10:39:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A5=E5=BF=97=E5=A4=84=E7=90=86IP=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/macro/mall/common/log/WebLogAspect.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mall-common/src/main/java/com/macro/mall/common/log/WebLogAspect.java b/mall-common/src/main/java/com/macro/mall/common/log/WebLogAspect.java index fb99c70..77a71f1 100644 --- a/mall-common/src/main/java/com/macro/mall/common/log/WebLogAspect.java +++ b/mall-common/src/main/java/com/macro/mall/common/log/WebLogAspect.java @@ -70,7 +70,8 @@ public class WebLogAspect { long endTime = System.currentTimeMillis(); String urlStr = request.getRequestURL().toString(); webLog.setBasePath(StrUtil.removeSuffix(urlStr, URLUtil.url(urlStr).getPath())); - webLog.setIp(request.getRemoteUser()); + webLog.setUsername(request.getRemoteUser()); + webLog.setIp(request.getRemoteAddr()); webLog.setMethod(request.getMethod()); webLog.setParameter(getParameter(method, joinPoint.getArgs())); webLog.setResult(result);