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
d9acfbef
Commit
d9acfbef
authored
Aug 08, 2019
by
yanzg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
常规BUG的修改
parent
4f03c9af
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
5 deletions
+22
-5
WebAspect.java
...ud/src/main/java/com/yanzuoguang/cloud/aop/WebAspect.java
+22
-5
No files found.
yzg-util-cloud/src/main/java/com/yanzuoguang/cloud/aop/WebAspect.java
View file @
d9acfbef
...
@@ -39,6 +39,9 @@ public class WebAspect extends BaseRequestAspect {
...
@@ -39,6 +39,9 @@ public class WebAspect extends BaseRequestAspect {
@Value
(
"${yzg.reqUrl:order,check,use}"
)
@Value
(
"${yzg.reqUrl:order,check,use}"
)
private
String
reqUrl
;
private
String
reqUrl
;
@Value
(
"${yzg.gateway:^.*gateway.*$}"
)
private
String
gateWay
;
/**
/**
* exec aop point aspect
* exec aop point aspect
*/
*/
...
@@ -59,11 +62,15 @@ public class WebAspect extends BaseRequestAspect {
...
@@ -59,11 +62,15 @@ public class WebAspect extends BaseRequestAspect {
Object
result
=
null
;
Object
result
=
null
;
Exception
ex
=
null
;
Exception
ex
=
null
;
Ref
<
Boolean
>
flag
=
new
Ref
<>(
false
);
Ref
<
Boolean
>
flag
=
new
Ref
<>(
false
);
boolean
isGateWay
=
isGateWay
();
try
{
try
{
tokenServiceCall
.
tokenInit
();
if
(!
isGateWay
)
{
tokenServiceCall
.
tokenInit
();
}
result
=
executeMethod
(
joinPoint
);
result
=
executeMethod
(
joinPoint
);
tokenFinish
(
flag
);
if
(!
isGateWay
)
{
tokenFinish
(
flag
);
}
return
result
;
return
result
;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
ex
=
e
;
ex
=
e
;
...
@@ -74,12 +81,22 @@ public class WebAspect extends BaseRequestAspect {
...
@@ -74,12 +81,22 @@ public class WebAspect extends BaseRequestAspect {
throw
e
;
throw
e
;
}
}
}
finally
{
}
finally
{
tokenFinish
(
flag
);
if
(!
isGateWay
)
{
tokenFinish
(
flag
);
}
responseLog
(
TAG
,
HttpAspectUtil
.
getHttpRequestUrl
(),
joinPoint
,
start
,
result
,
ex
);
responseLog
(
TAG
,
HttpAspectUtil
.
getHttpRequestUrl
(),
joinPoint
,
start
,
result
,
ex
);
}
}
}
}
/**
* 是否属于网关服务,网关服务不进行监控
*
* @return
*/
private
boolean
isGateWay
()
{
return
this
.
applicationName
.
matches
(
this
.
gateWay
);
}
/**
/**
* 执行结束函数
* 执行结束函数
*
*
...
...
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