From 6709c951ed9d3ead8028cb61e25978de2bc4d36b Mon Sep 17 00:00:00 2001 From: zxb <919411476@qq.com> Date: Mon, 7 Aug 2023 15:43:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=8B=A6=E6=88=AA=E5=99=A8?= =?UTF-8?q?=20=E4=BE=BF=E4=BA=8E=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/genersoft/iot/vmp/conf/security/RequestInterceptor.java | 2 +- .../java/com/genersoft/iot/vmp/conf/security/WebConfig.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/conf/security/RequestInterceptor.java b/src/main/java/com/genersoft/iot/vmp/conf/security/RequestInterceptor.java index ee1f0c07..36c0c6b9 100644 --- a/src/main/java/com/genersoft/iot/vmp/conf/security/RequestInterceptor.java +++ b/src/main/java/com/genersoft/iot/vmp/conf/security/RequestInterceptor.java @@ -15,7 +15,7 @@ import javax.servlet.http.HttpServletResponse; public class RequestInterceptor implements HandlerInterceptor { @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { - log.info("访问 {}",request.getRequestURI()); + log.info("{} 访问 {}",request.getRemoteHost(), request.getRequestURI()); return true; } } \ No newline at end of file diff --git a/src/main/java/com/genersoft/iot/vmp/conf/security/WebConfig.java b/src/main/java/com/genersoft/iot/vmp/conf/security/WebConfig.java index b5e9bee5..e3a36235 100644 --- a/src/main/java/com/genersoft/iot/vmp/conf/security/WebConfig.java +++ b/src/main/java/com/genersoft/iot/vmp/conf/security/WebConfig.java @@ -15,7 +15,7 @@ public class WebConfig implements WebMvcConfigurer { @Override public void addInterceptors(@NotNull InterceptorRegistry registry) { registry.addInterceptor(requestInterceptor) - .excludePathPatterns("/index/hook/**") + .excludePathPatterns("/index/hook/**","/static/**") .addPathPatterns("/**"); } } \ No newline at end of file