Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xyqb-user2
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
head_group
xyqb-user2
Commits
fbe49235
Commit
fbe49235
authored
May 24, 2018
by
徐小光
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'optimize/sonar' into 'master'
删除日志中多余的methodName,修改queryLog这个包名 See merge request
!9
parents
2c5bbbea
5d3b53d5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
16 deletions
+7
-16
LogCallHttpAspect.java
...n/quantgroup/xyqb/aspect/logcaller/LogCallHttpAspect.java
+2
-16
package-info.java
...tgroup/xyqb/controller/external/backend/package-info.java
+5
-0
No files found.
src/main/java/cn/quantgroup/xyqb/aspect/logcaller/LogCallHttpAspect.java
View file @
fbe49235
...
@@ -40,26 +40,12 @@ public class LogCallHttpAspect {
...
@@ -40,26 +40,12 @@ public class LogCallHttpAspect {
try
{
try
{
HttpServletRequest
request
=
attrs
.
getRequest
();
HttpServletRequest
request
=
attrs
.
getRequest
();
String
remoteIP
=
IPUtil
.
getRemoteIP
(
request
);
String
remoteIP
=
IPUtil
.
getRemoteIP
(
request
);
this
.
asyncRecordIt
(
pjp
,
result
,
remoteIP
);
Object
[]
args
=
pjp
.
getArgs
();
LOGGER
.
info
(
"http api is called,from IP:[{}],args:[{}]"
,
remoteIP
,
args
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
LOGGER
.
error
(
"打印http请求日志出错"
,
e
);
LOGGER
.
error
(
"打印http请求日志出错"
,
e
);
}
}
}
}
return
result
;
return
result
;
}
}
/**
* 异步记录日志
*
* @param pjp
* @param result
* @param remoteIP
*/
private
void
asyncRecordIt
(
ProceedingJoinPoint
pjp
,
Object
result
,
String
remoteIP
)
{
Object
[]
args
=
pjp
.
getArgs
();
String
methodName
=
pjp
.
getSignature
().
getName
();
String
targetName
=
pjp
.
getTarget
().
getClass
().
getName
();
LOGGER
.
info
(
"http api is called,from IP:[{}],method :[{}],args:[{}]"
,
remoteIP
,
targetName
.
concat
(
"."
).
concat
(
methodName
),
args
);
}
}
}
src/main/java/cn/quantgroup/xyqb/controller/external/backend/package-info.java
0 → 100644
View file @
fbe49235
/**
* 这个包是给运营系统之类的准备的.
*/
package
cn
.
quantgroup
.
xyqb
.
controller
.
external
.
backend
;
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