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
aaa9f24d
Commit
aaa9f24d
authored
Mar 22, 2019
by
yanzg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
检测值
parent
7db17030
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
5 deletions
+17
-5
WebAspect.java
...ud/src/main/java/com/yanzuoguang/cloud/aop/WebAspect.java
+17
-5
No files found.
yzg-util-cloud/src/main/java/com/yanzuoguang/cloud/aop/WebAspect.java
View file @
aaa9f24d
...
...
@@ -26,8 +26,13 @@ import org.springframework.stereotype.Component;
import
javax.servlet.ServletRequest
;
import
javax.servlet.ServletResponse
;
import
javax.servlet.http.HttpServlet
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.lang.reflect.Method
;
import
java.lang.reflect.Type
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.concurrent.LinkedBlockingQueue
;
/**
...
...
@@ -208,11 +213,18 @@ public class WebAspect extends AbstractValidateAspect implements ThreadNext.Next
logInterVo
.
setLogId
(
StringHelper
.
getNewID
());
logInterVo
.
setLogSources
(
applicationName
);
//平台名
logInterVo
.
setInterUrl
(
url
);
//请求URL
Object
para
=
joinPoint
.
getArgs
();
if
(
joinPoint
.
getArgs
().
length
==
1
)
{
para
=
joinPoint
.
getArgs
()[
0
];
List
<
Object
>
para
=
new
ArrayList
<>();
for
(
Object
item
:
joinPoint
.
getArgs
())
{
if
(
item
instanceof
HttpServlet
||
item
instanceof
HttpServletResponse
||
item
instanceof
HttpServletRequest
)
{
continue
;
}
logInterVo
.
setContent
(
JSON
.
toJSONString
(
para
));
//请求参数
para
.
add
(
item
);
}
Object
paraTo
=
para
;
if
(
para
.
size
()
==
1
)
{
paraTo
=
para
.
get
(
0
);
}
logInterVo
.
setContent
(
JSON
.
toJSONString
(
paraTo
));
//请求参数
logInterVo
.
setResult
(
JSON
.
toJSONString
(
responseResult
));
//返回参数
logInterVo
.
setStatus
(
responseResult
.
getCode
()
==
ResultConstants
.
SUCCESS
?
1
:
0
);
return
logInterVo
;
...
...
@@ -224,7 +236,7 @@ public class WebAspect extends AbstractValidateAspect implements ThreadNext.Next
* @return 是否继续执行
*/
@Override
public
boolean
next
()
throws
Exception
{
public
boolean
next
()
{
while
(
cache
.
size
()
>
0
)
{
LogVo
item
=
cache
.
poll
();
if
(
item
!=
null
)
{
...
...
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