diff --git a/continew-starter-log/continew-starter-log-interceptor/src/main/java/top/continew/starter/log/interceptor/autoconfigure/LogProperties.java b/continew-starter-log/continew-starter-log-interceptor/src/main/java/top/continew/starter/log/interceptor/autoconfigure/LogProperties.java index 6aef284..d1d320b 100644 --- a/continew-starter-log/continew-starter-log-interceptor/src/main/java/top/continew/starter/log/interceptor/autoconfigure/LogProperties.java +++ b/continew-starter-log/continew-starter-log-interceptor/src/main/java/top/continew/starter/log/interceptor/autoconfigure/LogProperties.java @@ -47,7 +47,7 @@ public class LogProperties { /** * 包含信息 */ - private Set includes = new HashSet<>(Include.defaultIncludes()); + private Set includes = Include.defaultIncludes(); /** * 放行路由 diff --git a/continew-starter-log/continew-starter-log-interceptor/src/main/java/top/continew/starter/log/interceptor/handler/LogInterceptor.java b/continew-starter-log/continew-starter-log-interceptor/src/main/java/top/continew/starter/log/interceptor/handler/LogInterceptor.java index 99e59c4..bd3e29a 100644 --- a/continew-starter-log/continew-starter-log-interceptor/src/main/java/top/continew/starter/log/interceptor/handler/LogInterceptor.java +++ b/continew-starter-log/continew-starter-log-interceptor/src/main/java/top/continew/starter/log/interceptor/handler/LogInterceptor.java @@ -36,6 +36,7 @@ import top.continew.starter.log.interceptor.autoconfigure.LogProperties; import java.time.Clock; +import java.util.HashSet; import java.util.Set; /** @@ -115,7 +116,8 @@ public void afterCompletion(@NonNull HttpServletRequest request, * @return 日志包含信息 */ private Set getIncludes(Log methodLog, Log classLog) { - Set includeSet = logProperties.getIncludes(); + Set oriIncludeSet = logProperties.getIncludes(); + Set includeSet = new HashSet<>(oriIncludeSet); if (null != classLog) { this.processInclude(includeSet, classLog); }