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
7b602b97
Commit
7b602b97
authored
Jan 08, 2020
by
yanzg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
异常处理显示
parent
09b61120
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
23 deletions
+6
-23
WebAspect.java
...ud/src/main/java/com/yanzuoguang/cloud/aop/WebAspect.java
+1
-16
TokenServiceCall.java
.../java/com/yanzuoguang/cloud/service/TokenServiceCall.java
+5
-7
No files found.
yzg-util-cloud/src/main/java/com/yanzuoguang/cloud/aop/WebAspect.java
View file @
7b602b97
...
...
@@ -68,12 +68,10 @@ public class WebAspect extends BaseRequestAspect {
// 用户数据库记录
long
start
=
requestLog
(
TAG
,
joinPoint
);
Exception
ex
=
null
;
Ref
<
Boolean
>
flag
=
new
Ref
<>(
false
);
boolean
isInit
=
false
;
try
{
isInit
=
tokenServiceCall
.
tokenInit
();
result
=
executeMethod
(
joinPoint
);
tokenFinish
(
flag
);
return
result
;
}
catch
(
Exception
e
)
{
ex
=
e
;
...
...
@@ -84,8 +82,8 @@ public class WebAspect extends BaseRequestAspect {
throw
e
;
}
}
finally
{
tokenServiceCall
.
tokenFinish
();
if
(
isInit
)
{
tokenFinish
(
flag
);
TokenHelper
.
remove
();
}
responseLog
(
logWeb
,
clear
,
TAG
,
HttpAspectUtil
.
getHttpRequestUrl
(),
joinPoint
,
start
,
result
,
ex
);
...
...
@@ -101,19 +99,6 @@ public class WebAspect extends BaseRequestAspect {
return
this
.
applicationName
.
matches
(
this
.
gateWay
);
}
/**
* 执行结束函数
*
* @param flag 结束函数
* @return 结束函数
*/
private
void
tokenFinish
(
Ref
<
Boolean
>
flag
)
{
if
(
flag
.
value
==
true
)
{
return
;
}
flag
.
value
=
true
;
tokenServiceCall
.
tokenFinish
();
}
/**
* 获取返回的至类型
...
...
yzg-util-cloud/src/main/java/com/yanzuoguang/cloud/service/TokenServiceCall.java
View file @
7b602b97
...
...
@@ -52,15 +52,14 @@ public class TokenServiceCall implements TokenLoad {
*/
public
boolean
tokenInit
()
{
init
();
addHave
();
if
(
tokenService
==
null
)
{
return
false
;
}
if
(
addHave
(
0
)
==
1
)
{
return
false
;
if
(
addHave
()
==
1
)
{
tokenService
.
tokenInit
();
return
true
;
}
tokenService
.
tokenInit
();
return
true
;
return
false
;
}
/**
...
...
@@ -68,11 +67,10 @@ public class TokenServiceCall implements TokenLoad {
*/
public
void
tokenFinish
()
{
init
();
subHave
();
if
(
tokenService
==
null
)
{
return
;
}
if
(
addHave
(
0
)
==
0
)
{
if
(
subHave
(
)
==
0
)
{
tokenService
.
tokenFinish
();
}
}
...
...
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