Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
Y
yzg-util
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
YZG
yzg-util
Commits
f51a714b
Commit
f51a714b
authored
May 11, 2022
by
yanzg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复bug
parent
ee48edef
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
15 deletions
+21
-15
AspectLogUrl.java
...src/main/java/com/yanzuoguang/cloud/aop/AspectLogUrl.java
+21
-15
No files found.
yzg-util-cloud/src/main/java/com/yanzuoguang/cloud/aop/AspectLogUrl.java
View file @
f51a714b
package
com
.
yanzuoguang
.
cloud
.
aop
;
import
com.yanzuoguang.cloud.CloudConfig
;
import
com.yanzuoguang.cloud.helper.CookiesHelper
;
import
com.yanzuoguang.util.helper.ArrayHelper
;
import
com.yanzuoguang.util.helper.StringHelper
;
import
org.aspectj.lang.ProceedingJoinPoint
;
...
...
@@ -13,6 +14,7 @@ import org.springframework.web.bind.annotation.GetMapping;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
javax.servlet.http.HttpServletRequest
;
import
java.lang.annotation.Annotation
;
import
java.lang.reflect.Method
;
import
java.util.ArrayList
;
...
...
@@ -94,24 +96,28 @@ public class AspectLogUrl {
if
(
feignClient
!=
null
)
{
sb
.
append
(
feignClient
.
value
());
sb
.
append
(
":"
);
}
List
<
RequestMapping
>
reqList
=
ArrayHelper
.
mergeList
(
classRequests
,
requests
);
List
<
PostMapping
>
postList
=
ArrayHelper
.
mergeList
(
classPosts
,
posts
);
List
<
GetMapping
>
getList
=
ArrayHelper
.
mergeList
(
classGets
,
gets
);
for
(
RequestMapping
item
:
reqList
)
{
if
(
item
.
value
()
!=
null
&&
item
.
value
().
length
>
0
)
{
sb
.
append
(
item
.
value
()[
0
]);
List
<
RequestMapping
>
reqList
=
ArrayHelper
.
mergeList
(
classRequests
,
requests
);
List
<
PostMapping
>
postList
=
ArrayHelper
.
mergeList
(
classPosts
,
posts
);
List
<
GetMapping
>
getList
=
ArrayHelper
.
mergeList
(
classGets
,
gets
);
for
(
RequestMapping
item
:
reqList
)
{
if
(
item
.
value
()
!=
null
&&
item
.
value
().
length
>
0
)
{
sb
.
append
(
item
.
value
()[
0
]);
}
}
}
for
(
PostMapping
item
:
postList
)
{
if
(
item
.
value
()
!=
null
&&
item
.
value
().
length
>
0
)
{
sb
.
append
(
item
.
value
()[
0
]);
for
(
PostMapping
item
:
postList
)
{
if
(
item
.
value
()
!=
null
&&
item
.
value
().
length
>
0
)
{
sb
.
append
(
item
.
value
()[
0
]);
}
}
}
for
(
GetMapping
item
:
getList
)
{
if
(
item
.
value
()
!=
null
&&
item
.
value
().
length
>
0
)
{
sb
.
append
(
item
.
value
()[
0
]);
for
(
GetMapping
item
:
getList
)
{
if
(
item
.
value
()
!=
null
&&
item
.
value
().
length
>
0
)
{
sb
.
append
(
item
.
value
()[
0
]);
}
}
}
else
{
HttpServletRequest
request
=
CookiesHelper
.
getRequest
();
sb
.
append
(
request
.
getRequestURI
());
}
return
sb
.
toString
();
}
...
...
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