Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-platform-enterprise
Overview
Overview
Details
Activity
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
base_platform_enterprise
gic-platform-enterprise
Commits
7a8f424e
Commit
7a8f424e
authored
Sep 27, 2020
by
陶光胜
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' into 'master'
Developer See merge request
!53
parents
5a7e2ba0
d40ec812
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
61 additions
and
1 deletions
+61
-1
WeChatMenuDTO.java
...i/src/main/java/com/gic/enterprise/dto/WeChatMenuDTO.java
+0
-1
ParamAop.java
...ice/src/main/java/com/gic/enterprise/config/ParamAop.java
+61
-0
No files found.
gic-platform-enterprise-api/src/main/java/com/gic/enterprise/dto/WeChatMenuDTO.java
View file @
7a8f424e
...
...
@@ -15,7 +15,6 @@ import java.util.List;
*/
public
class
WeChatMenuDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
4659824138256697908L
;
@JSONField
(
name
=
"1111"
)
private
String
type
;
private
String
name
;
private
String
key
;
...
...
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/config/ParamAop.java
0 → 100644
View file @
7a8f424e
package
com
.
gic
.
enterprise
.
config
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.aspectj.lang.ProceedingJoinPoint
;
import
org.aspectj.lang.Signature
;
import
org.aspectj.lang.annotation.Around
;
import
org.aspectj.lang.annotation.Aspect
;
import
org.aspectj.lang.reflect.MethodSignature
;
import
org.springframework.context.annotation.Configuration
;
/**
* 采集GIC系统操作日志
*
* @author leeon
* @date 2019年6月28日
*/
@Aspect
@Configuration
public
class
ParamAop
{
private
Logger
logger
=
LogManager
.
getLogger
(
ParamAop
.
class
);
/**
* 环绕通知
*
* @param joinPoint
* @return
* @throws Throwable
*/
@Around
(
value
=
"execution(* com.gic.*.service..*(..))"
)
public
Object
around
(
ProceedingJoinPoint
joinPoint
)
throws
Throwable
{
try
{
// 当前方法
String
currentMethodName
=
getMethodName
(
joinPoint
);
// 当前方法参数列表
Object
[]
args
=
joinPoint
.
getArgs
();
logger
.
info
(
"请求方法:{}, 参数:{}"
,
currentMethodName
,
args
);
// 执行当前方法
return
joinPoint
.
proceed
();
}
catch
(
Throwable
throwable
)
{
logger
.
warn
(
"拦截器错误"
,
throwable
);
throw
throwable
;
}
}
/**
* 获取当前方法
*
* @param joinPoint
* @return
* @throws
*/
private
String
getMethodName
(
ProceedingJoinPoint
joinPoint
)
throws
NoSuchMethodException
{
Signature
signature
=
joinPoint
.
getSignature
();
MethodSignature
methodSignature
=
(
MethodSignature
)
signature
;
Object
target
=
joinPoint
.
getTarget
();
return
target
.
getClass
().
getName
()
+
"."
+
methodSignature
.
getName
();
}
}
\ No newline at end of file
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