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
4f03c9af
Commit
4f03c9af
authored
Aug 08, 2019
by
yanzg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
常规BUG的修改
parent
a4df9515
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
2 deletions
+7
-2
BaseRequestAspect.java
...ain/java/com/yanzuoguang/cloud/aop/BaseRequestAspect.java
+3
-0
FeignAspect.java
.../src/main/java/com/yanzuoguang/cloud/aop/FeignAspect.java
+2
-1
MqAspect.java
...oud/src/main/java/com/yanzuoguang/cloud/aop/MqAspect.java
+2
-1
No files found.
yzg-util-cloud/src/main/java/com/yanzuoguang/cloud/aop/BaseRequestAspect.java
View file @
4f03c9af
...
...
@@ -154,6 +154,9 @@ public class BaseRequestAspect implements ThreadNext.Next {
protected
void
responseLog
(
String
tag
,
String
url
,
ProceedingJoinPoint
joinPoint
,
long
start
,
Object
result
,
Exception
resultEx
)
{
try
{
String
name
=
joinPoint
.
getSignature
().
getName
();
if
(
StringHelper
.
isEmpty
(
url
))
{
url
=
String
.
format
(
"%s.%s"
,
joinPoint
.
getSignature
().
getDeclaringTypeName
(),
name
);
}
// 处理结果
ResponseResult
responseResult
;
if
(
result
instanceof
ResponseResult
)
{
...
...
yzg-util-cloud/src/main/java/com/yanzuoguang/cloud/aop/FeignAspect.java
View file @
4f03c9af
...
...
@@ -3,6 +3,7 @@ package com.yanzuoguang.cloud.aop;
import
com.yanzuoguang.util.contants.ResultConstants
;
import
com.yanzuoguang.util.exception.CodeException
;
import
com.yanzuoguang.util.exception.ExceptionHelper
;
import
com.yanzuoguang.util.helper.StringHelper
;
import
com.yanzuoguang.util.vo.ResponseResult
;
import
org.aspectj.lang.ProceedingJoinPoint
;
import
org.aspectj.lang.annotation.Around
;
...
...
@@ -60,7 +61,7 @@ public class FeignAspect extends BaseRequestAspect {
ex
=
e
;
throw
e
;
}
finally
{
responseLog
(
TAG
,
joinPoint
.
getSignature
().
getName
()
,
joinPoint
,
start
,
result
,
ex
);
responseLog
(
TAG
,
StringHelper
.
EMPTY
,
joinPoint
,
start
,
result
,
ex
);
}
}
...
...
yzg-util-cloud/src/main/java/com/yanzuoguang/cloud/aop/MqAspect.java
View file @
4f03c9af
package
com
.
yanzuoguang
.
cloud
.
aop
;
import
com.yanzuoguang.util.exception.ExceptionHelper
;
import
com.yanzuoguang.util.helper.StringHelper
;
import
org.aspectj.lang.ProceedingJoinPoint
;
import
org.aspectj.lang.annotation.Around
;
import
org.aspectj.lang.annotation.Aspect
;
...
...
@@ -46,7 +47,7 @@ public class MqAspect extends BaseRequestAspect {
ex
=
e
;
throw
e
;
}
finally
{
responseLog
(
TAG
,
joinPoint
.
getSignature
().
getName
()
,
joinPoint
,
start
,
result
,
ex
);
responseLog
(
TAG
,
StringHelper
.
EMPTY
,
joinPoint
,
start
,
result
,
ex
);
}
}
...
...
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