Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
order-group
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
jenkins
order-group
Commits
2db2e258
Commit
2db2e258
authored
Mar 25, 2020
by
dingkai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
日志优化
parent
ac91ec33
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
16 deletions
+16
-16
order-application-service/src/main/java/cn/freemud/utils/LogUtil.java
+8
-8
shopping-cart-application-service/src/main/java/cn/freemud/utils/LogUtil.java
+8
-8
No files found.
order-application-service/src/main/java/cn/freemud/utils/LogUtil.java
View file @
2db2e258
...
@@ -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
);
...
...
shopping-cart-application-service/src/main/java/cn/freemud/utils/LogUtil.java
View file @
2db2e258
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment