Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
S
shop
Project
Project
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
曲欣亮
shop
Commits
aa9e7acb
Commit
aa9e7acb
authored
Oct 15, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
15c4ac91
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
10 deletions
+47
-10
CommonInterceptor.java
.../com/egolm/shop/config/interceptor/CommonInterceptor.java
+38
-0
application-pro.properties
src/main/resources/application-pro.properties
+0
-3
application-test.properties
src/main/resources/application-test.properties
+5
-3
application.properties
src/main/resources/application.properties
+4
-4
No files found.
src/main/java/com/egolm/shop/config/interceptor/CommonInterceptor.java
0 → 100644
View file @
aa9e7acb
package
com
.
egolm
.
shop
.
config
.
interceptor
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Component
;
import
org.springframework.web.servlet.handler.HandlerInterceptorAdapter
;
import
com.alibaba.fastjson.JSON
;
import
com.egolm.common.web.ServletUtil
;
@Component
public
class
CommonInterceptor
extends
HandlerInterceptorAdapter
{
@Override
public
boolean
preHandle
(
HttpServletRequest
req
,
HttpServletResponse
resp
,
Object
handler
)
throws
Exception
{
this
.
exec
(
req
);
return
super
.
preHandle
(
req
,
resp
,
handler
);
}
@Async
private
void
exec
(
HttpServletRequest
req
)
{
try
{
String
contextPath
=
req
.
getContextPath
();
String
uri
=
req
.
getRequestURI
().
substring
(
contextPath
.
length
());
String
remoteIp
=
ServletUtil
.
remoteIp
(
req
);
String
params
=
JSON
.
toJSONString
(
req
.
getParameterMap
());
}
catch
(
Throwable
e
)
{
e
.
printStackTrace
();
}
}
}
src/main/resources/application-pro.properties
View file @
aa9e7acb
logging.level.com.egolm
=
debug
spring.datasource.username
=
sa
spring.datasource.password
=
Asters#2019@Linkfern
spring.datasource.url
=
jdbc:sqlserver://172.16.0.8:55433;instanceName=SQLSERVER;DatabaseName=B2BDB;allowMultiQueries=true
...
...
src/main/resources/application-test.properties
View file @
aa9e7acb
logging.level.com.egolm
=
debug
spring.datasource.username
=
ERP
spring.datasource.password
=
qiyang@2013
spring.datasource.url
=
jdbc:sqlserver://127.0.0.1:1433;instanceName=SQLSERVER;DatabaseName=B2BDB;allowMultiQueries=true
spring.datasource.driver-class-name
=
com.microsoft.sqlserver.jdbc.SQLServerDriver
redis.guest.key
=
B2B_Guest
redis.sms.code.key
=
B2B_Sms
\ No newline at end of file
log.datasource.username
=
root
log.datasource.password
=
asters#2019
log.datasource.url
=
jdbc:mysql://127.0.0.1:3306/shopLog?useSSL=false&useUnicode=true&characterEncoding=utf8
\ No newline at end of file
src/main/resources/application.properties
View file @
aa9e7acb
...
...
@@ -45,10 +45,10 @@ spring.datasource.validationQuery=SELECT 1
spring.datasource.timeBetweenEvictionRunsMillis
=
3600000
spring.datasource.filters
=
stat,log4j
log.datasource.username
=
root
log.datasource.password
=
123456
log.datasource.url
=
jdbc:mysql://10.10.0.
111:3306/mv
?useSSL=false&useUnicode=true&characterEncoding=utf8
log.datasource.driver-class-name
=
com.mysql.jdbc.Driver
log.datasource.username
=
ERP
log.datasource.password
=
qiyang@2013
log.datasource.url
=
jdbc:mysql://10.10.0.
21:3306/shopLog
?useSSL=false&useUnicode=true&characterEncoding=utf8
log.datasource.driver-class-name
=
com.mysql.
cj.
jdbc.Driver
log.datasource.testWhileIdle
=
true
log.datasource.validationQueryTimeout
=
5
log.datasource.validationQuery
=
SELECT 1 FROM DUAL
...
...
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