Commit 2db2e258 by dingkai

日志优化

parent ac91ec33
......@@ -288,7 +288,6 @@ public class LogUtil {
if (StringUtils.isEmpty(uri) && method != null) {
PostMapping postMapping = AnnotationUtils.getAnnotation(method, PostMapping.class);
uri = uriPre + (!Objects.equals(postMapping, null) && !Objects.equals(postMapping.path(), null) && postMapping.path().length > 0 ? postMapping.path()[0] : "");
}
if (StringUtils.isEmpty(uri)) {
GetMapping getMapping = AnnotationUtils.getAnnotation(method, GetMapping.class);
uri = uriPre + (!Objects.equals(getMapping, null) && !Objects.equals(getMapping.path(), null) && getMapping.path().length > 0 ? getMapping.path()[0] : "");
......@@ -297,6 +296,7 @@ public class LogUtil {
RequestMapping methodRequestMapping = AnnotationUtils.getAnnotation(method, RequestMapping.class);
uri = uriPre + (!Objects.equals(methodRequestMapping, null) && !Objects.equals(methodRequestMapping.path(), null) && methodRequestMapping.path().length > 0 ? methodRequestMapping.path()[0] : "");
}
}
ThirdPartLogVo thirdPartLogVo = new ThirdPartLogVo();
thirdPartLogVo.setThirdPartName(serviceName);
thirdPartLogVo.setUri(uri);
......
......@@ -297,7 +297,6 @@ public class LogUtil {
if (method != null) {
PostMapping postMapping = AnnotationUtils.getAnnotation(method, PostMapping.class);
uri = uriPre + (!Objects.equals(postMapping, null) && postMapping.path().length > 0 ? postMapping.path()[0] : "");
}
if (StringUtils.isEmpty(uri)) {
GetMapping getMapping = AnnotationUtils.getAnnotation(method, GetMapping.class);
uri = uriPre + (!Objects.equals(getMapping, null) && getMapping.path().length > 0 ? getMapping.path()[0] : "");
......@@ -306,6 +305,7 @@ public class LogUtil {
RequestMapping methodRequestMapping = AnnotationUtils.getAnnotation(method, RequestMapping.class);
uri = uriPre + (!Objects.equals(methodRequestMapping, null) && methodRequestMapping.path().length > 0 ? methodRequestMapping.path()[0] : "");
}
}
ThirdPartLogVo thirdPartLogVo = new ThirdPartLogVo();
thirdPartLogVo.setThirdPartName(serviceName);
thirdPartLogVo.setUri(uri);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment