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
Hide 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;
...
@@ -26,8 +26,13 @@ import org.springframework.stereotype.Component;
import
javax.servlet.ServletRequest
;
import
javax.servlet.ServletRequest
;
import
javax.servlet.ServletResponse
;
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.Method
;
import
java.lang.reflect.Type
;
import
java.lang.reflect.Type
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.concurrent.LinkedBlockingQueue
;
import
java.util.concurrent.LinkedBlockingQueue
;
/**
/**
...
@@ -208,11 +213,18 @@ public class WebAspect extends AbstractValidateAspect implements ThreadNext.Next
...
@@ -208,11 +213,18 @@ public class WebAspect extends AbstractValidateAspect implements ThreadNext.Next
logInterVo
.
setLogId
(
StringHelper
.
getNewID
());
logInterVo
.
setLogId
(
StringHelper
.
getNewID
());
logInterVo
.
setLogSources
(
applicationName
);
//平台名
logInterVo
.
setLogSources
(
applicationName
);
//平台名
logInterVo
.
setInterUrl
(
url
);
//请求URL
logInterVo
.
setInterUrl
(
url
);
//请求URL
Object
para
=
joinPoint
.
getArgs
();
List
<
Object
>
para
=
new
ArrayList
<>();
if
(
joinPoint
.
getArgs
().
length
==
1
)
{
for
(
Object
item
:
joinPoint
.
getArgs
())
{
para
=
joinPoint
.
getArgs
()[
0
];
if
(
item
instanceof
HttpServlet
||
item
instanceof
HttpServletResponse
||
item
instanceof
HttpServletRequest
)
{
continue
;
}
para
.
add
(
item
);
}
Object
paraTo
=
para
;
if
(
para
.
size
()
==
1
)
{
paraTo
=
para
.
get
(
0
);
}
}
logInterVo
.
setContent
(
JSON
.
toJSONString
(
para
));
//请求参数
logInterVo
.
setContent
(
JSON
.
toJSONString
(
para
To
));
//请求参数
logInterVo
.
setResult
(
JSON
.
toJSONString
(
responseResult
));
//返回参数
logInterVo
.
setResult
(
JSON
.
toJSONString
(
responseResult
));
//返回参数
logInterVo
.
setStatus
(
responseResult
.
getCode
()
==
ResultConstants
.
SUCCESS
?
1
:
0
);
logInterVo
.
setStatus
(
responseResult
.
getCode
()
==
ResultConstants
.
SUCCESS
?
1
:
0
);
return
logInterVo
;
return
logInterVo
;
...
@@ -224,7 +236,7 @@ public class WebAspect extends AbstractValidateAspect implements ThreadNext.Next
...
@@ -224,7 +236,7 @@ public class WebAspect extends AbstractValidateAspect implements ThreadNext.Next
* @return 是否继续执行
* @return 是否继续执行
*/
*/
@Override
@Override
public
boolean
next
()
throws
Exception
{
public
boolean
next
()
{
while
(
cache
.
size
()
>
0
)
{
while
(
cache
.
size
()
>
0
)
{
LogVo
item
=
cache
.
poll
();
LogVo
item
=
cache
.
poll
();
if
(
item
!=
null
)
{
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