Commit 2db2e258 by dingkai

日志优化

parent ac91ec33
...@@ -288,14 +288,14 @@ public class LogUtil { ...@@ -288,14 +288,14 @@ public class LogUtil {
if (StringUtils.isEmpty(uri) && method != null) { if (StringUtils.isEmpty(uri) && method != null) {
PostMapping postMapping = AnnotationUtils.getAnnotation(method, PostMapping.class); 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] : ""); uri = uriPre + (!Objects.equals(postMapping, null) && !Objects.equals(postMapping.path(), null) && postMapping.path().length > 0 ? postMapping.path()[0] : "");
} if (StringUtils.isEmpty(uri)) {
if (StringUtils.isEmpty(uri)) { GetMapping getMapping = AnnotationUtils.getAnnotation(method, GetMapping.class);
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] : "");
uri = uriPre + (!Objects.equals(getMapping, null) && !Objects.equals(getMapping.path(), null) && getMapping.path().length > 0 ? getMapping.path()[0] : ""); }
} if (StringUtils.isEmpty(uri)) {
if (StringUtils.isEmpty(uri)) { RequestMapping methodRequestMapping = AnnotationUtils.getAnnotation(method, RequestMapping.class);
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] : "");
uri = uriPre + (!Objects.equals(methodRequestMapping, null) && !Objects.equals(methodRequestMapping.path(), null) && methodRequestMapping.path().length > 0 ? methodRequestMapping.path()[0] : ""); }
} }
ThirdPartLogVo thirdPartLogVo = new ThirdPartLogVo(); ThirdPartLogVo thirdPartLogVo = new ThirdPartLogVo();
thirdPartLogVo.setThirdPartName(serviceName); thirdPartLogVo.setThirdPartName(serviceName);
......
...@@ -297,14 +297,14 @@ public class LogUtil { ...@@ -297,14 +297,14 @@ public class LogUtil {
if (method != null) { if (method != null) {
PostMapping postMapping = AnnotationUtils.getAnnotation(method, PostMapping.class); PostMapping postMapping = AnnotationUtils.getAnnotation(method, PostMapping.class);
uri = uriPre + (!Objects.equals(postMapping, null) && postMapping.path().length > 0 ? postMapping.path()[0] : ""); uri = uriPre + (!Objects.equals(postMapping, null) && postMapping.path().length > 0 ? postMapping.path()[0] : "");
} if (StringUtils.isEmpty(uri)) {
if (StringUtils.isEmpty(uri)) { GetMapping getMapping = AnnotationUtils.getAnnotation(method, GetMapping.class);
GetMapping getMapping = AnnotationUtils.getAnnotation(method, GetMapping.class); uri = uriPre + (!Objects.equals(getMapping, null) && getMapping.path().length > 0 ? getMapping.path()[0] : "");
uri = uriPre + (!Objects.equals(getMapping, null) && getMapping.path().length > 0 ? getMapping.path()[0] : ""); }
} if (StringUtils.isEmpty(uri)) {
if (StringUtils.isEmpty(uri)) { RequestMapping methodRequestMapping = AnnotationUtils.getAnnotation(method, RequestMapping.class);
RequestMapping methodRequestMapping = AnnotationUtils.getAnnotation(method, RequestMapping.class); uri = uriPre + (!Objects.equals(methodRequestMapping, null) && methodRequestMapping.path().length > 0 ? methodRequestMapping.path()[0] : "");
uri = uriPre + (!Objects.equals(methodRequestMapping, null) && methodRequestMapping.path().length > 0 ? methodRequestMapping.path()[0] : ""); }
} }
ThirdPartLogVo thirdPartLogVo = new ThirdPartLogVo(); ThirdPartLogVo thirdPartLogVo = new ThirdPartLogVo();
thirdPartLogVo.setThirdPartName(serviceName); thirdPartLogVo.setThirdPartName(serviceName);
......
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