mirror of
https://github.com/continew-org/continew-starter.git
synced 2025-09-09 20:57:23 +08:00
fix(log): 修复日志全局 includes 配置会被局部修改的问题
This commit is contained in:
@@ -47,7 +47,7 @@ public class LogProperties {
|
|||||||
/**
|
/**
|
||||||
* 包含信息
|
* 包含信息
|
||||||
*/
|
*/
|
||||||
private Set<Include> includes = new HashSet<>(Include.defaultIncludes());
|
private Set<Include> includes = Include.defaultIncludes();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 放行路由
|
* 放行路由
|
||||||
|
@@ -36,6 +36,7 @@ import top.continew.starter.log.core.model.LogResponse;
|
|||||||
import top.continew.starter.log.interceptor.autoconfigure.LogProperties;
|
import top.continew.starter.log.interceptor.autoconfigure.LogProperties;
|
||||||
|
|
||||||
import java.time.Clock;
|
import java.time.Clock;
|
||||||
|
import java.util.HashSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -115,7 +116,8 @@ public class LogInterceptor implements HandlerInterceptor {
|
|||||||
* @return 日志包含信息
|
* @return 日志包含信息
|
||||||
*/
|
*/
|
||||||
private Set<Include> getIncludes(Log methodLog, Log classLog) {
|
private Set<Include> getIncludes(Log methodLog, Log classLog) {
|
||||||
Set<Include> includeSet = logProperties.getIncludes();
|
Set<Include> oriIncludeSet = logProperties.getIncludes();
|
||||||
|
Set<Include> includeSet = new HashSet<>(oriIncludeSet);
|
||||||
if (null != classLog) {
|
if (null != classLog) {
|
||||||
this.processInclude(includeSet, classLog);
|
this.processInclude(includeSet, classLog);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user