提交 b54e133b 作者: 方治民

chore: 代码警告处理

上级 b57ce5b3
...@@ -37,7 +37,7 @@ public class RequestAspect { ...@@ -37,7 +37,7 @@ public class RequestAspect {
/** /**
* 白名单(忽略) * 白名单(忽略)
*/ */
List<String> IGNORE_LIST = List.of("/swagger-resources", "/error", "/v3/api-docs"); static final List<String> IGNORE_LIST = List.of("/swagger-resources", "/error", "/v3/api-docs");
@Pointcut( @Pointcut(
"@annotation(org.springframework.web.bind.annotation.RequestMapping) || @annotation(org.springframework.web.bind.annotation.PostMapping) || @annotation(org.springframework.web.bind.annotation.GetMapping) || @annotation(org.springframework.web.bind.annotation.PutMapping) || @annotation(org.springframework.web.bind.annotation.DeleteMapping) || @annotation(org.springframework.web.bind.annotation.PatchMapping) || @annotation(org.springframework.web.bind.annotation.ExceptionHandler)" "@annotation(org.springframework.web.bind.annotation.RequestMapping) || @annotation(org.springframework.web.bind.annotation.PostMapping) || @annotation(org.springframework.web.bind.annotation.GetMapping) || @annotation(org.springframework.web.bind.annotation.PutMapping) || @annotation(org.springframework.web.bind.annotation.DeleteMapping) || @annotation(org.springframework.web.bind.annotation.PatchMapping) || @annotation(org.springframework.web.bind.annotation.ExceptionHandler)"
...@@ -96,11 +96,11 @@ public class RequestAspect { ...@@ -96,11 +96,11 @@ public class RequestAspect {
// 打印请求日志 (Optional Replace: MDC, Trace) // 打印请求日志 (Optional Replace: MDC, Trace)
log.info( log.info(
"[Request] Method: {}, URL: {}, Status: {}, IP: {}, Times: {}{}", "[Request] IP: {}, Method: {}, URL: {}, Status: {}, Times: {}{}",
Commons.getClientIpAddress(request),
request.getMethod(), request.getMethod(),
request.getRequestURL(), request.getRequestURL(),
status, status,
Commons.getClientIpAddress(request),
times, times,
extra extra
); );
......
...@@ -53,9 +53,9 @@ public class DateTimeConfig { ...@@ -53,9 +53,9 @@ public class DateTimeConfig {
return source -> LocalTime.parse(source, DateFormatter.TIME); return source -> LocalTime.parse(source, DateFormatter.TIME);
} }
interface StringToLocalDateTimeConverter extends Converter<String, LocalDateTime> {} public interface StringToLocalDateTimeConverter extends Converter<String, LocalDateTime> {}
interface StringToLocalDateConverter extends Converter<String, LocalDate> {} public interface StringToLocalDateConverter extends Converter<String, LocalDate> {}
interface StringToLocalTimeConverter extends Converter<String, LocalTime> {} public interface StringToLocalTimeConverter extends Converter<String, LocalTime> {}
} }
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论