mirror of
https://github.com/continew-org/continew-starter.git
synced 2025-09-13 10:59:19 +08:00
refactor: 优化部分代码
移除所有 toString(),修复 Sonar、Codacy 扫描问题
This commit is contained in:
@@ -99,9 +99,4 @@ public class CorsProperties {
|
||||
public void setExposedHeaders(List<String> exposedHeaders) {
|
||||
this.exposedHeaders = exposedHeaders;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CorsProperties{" + "enabled=" + enabled + ", allowedOrigins=" + allowedOrigins + ", allowedMethods=" + allowedMethods + ", allowedHeaders=" + allowedHeaders + ", exposedHeaders=" + exposedHeaders + '}';
|
||||
}
|
||||
}
|
||||
|
@@ -81,9 +81,4 @@ public class TLogProperties {
|
||||
public void setMdcEnable(Boolean mdcEnable) {
|
||||
this.mdcEnable = mdcEnable;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "TLogProperties{" + "pattern='" + pattern + '\'' + ", enableInvokeTimePrint=" + enableInvokeTimePrint + ", idGenerator='" + idGenerator + '\'' + ", mdcEnable=" + mdcEnable + '}';
|
||||
}
|
||||
}
|
||||
|
@@ -57,10 +57,10 @@ public class TLogServletFilter implements Filter {
|
||||
httpServletResponse.addHeader(headerName, TLogContext.getTraceId());
|
||||
}
|
||||
chain.doFilter(request, response);
|
||||
return;
|
||||
} finally {
|
||||
TLogWebCommon.loadInstance().afterCompletion();
|
||||
}
|
||||
return;
|
||||
}
|
||||
chain.doFilter(request, response);
|
||||
}
|
||||
|
@@ -68,9 +68,4 @@ public class TraceProperties {
|
||||
public void setTlog(TLogProperties tlog) {
|
||||
this.tlog = tlog;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "TraceProperties{" + "enabled=" + enabled + ", headerName='" + headerName + '\'' + ", tlog=" + tlog + '}';
|
||||
}
|
||||
}
|
||||
|
@@ -217,9 +217,4 @@ public class R<T> implements Serializable {
|
||||
public void setTimestamp(long timestamp) {
|
||||
this.timestamp = timestamp;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "R{" + "success=" + success + ", code=" + code + ", msg='" + msg + '\'' + ", data=" + data + ", timestamp=" + timestamp + '}';
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user