Commit fc2cd51e authored by Quxl's avatar Quxl

优化数据库配置

parent f430fb28
......@@ -21,7 +21,7 @@ public class AdminLoginInterceptor extends HandlerInterceptorAdapter {
if(tokenService.isLogin()) {
return super.preHandle(req, resp, handler);
} else {
throw new XException("用户未登陆");
throw new XException("用户未登陆", 300);
}
}
......
......@@ -21,7 +21,7 @@ public class UserLoginInterceptor extends HandlerInterceptorAdapter {
if(tokenService.isLogin()) {
return super.preHandle(req, resp, handler);
} else {
throw new XException("用户未登陆");
throw new XException("用户未登陆", 300);
}
}
......
......@@ -2,6 +2,14 @@ spring.datasource.url=jdbc:mysql://10.10.0.111:3306/film_critic_2018?useSSL=fals
spring.datasource.username=root
spring.datasource.password=egolm#2018
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.testWhileIdle=true
spring.datasource.validationQuery=SELECT 1
spring.datasource.timeBetweenEvictionRunsMillis=3600000
\ No newline at end of file
spring.datasource.test-while-idle=true
spring.datasource.test-on-borrow=false
spring.datasource.test-on-return=false
spring.datasource.validation-query=SELECT 1 FROM DUAL
spring.datasource.time-between-eviction-runs-millis=300000
spring.datasource.min-evictable-idle-time-millis=1800000
spring.datasource.max-wait=10000
spring.datasource.initial-size=10
spring.datasource.max-active=100
spring.datasource.min-idle=10
\ No newline at end of file
......@@ -2,6 +2,15 @@ spring.datasource.url=jdbc:mysql://10.10.0.111:3306/film_critic_2018?useSSL=fals
spring.datasource.username=root
spring.datasource.password=egolm#2018
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.testWhileIdle=true
spring.datasource.validationQuery=SELECT 1
spring.datasource.timeBetweenEvictionRunsMillis=3600000
\ No newline at end of file
spring.datasource.test-while-idle=true
spring.datasource.test-on-borrow=false
spring.datasource.test-on-return=false
spring.datasource.validation-query=SELECT 1 FROM DUAL
spring.datasource.time-between-eviction-runs-millis=300000
spring.datasource.min-evictable-idle-time-millis=1800000
spring.datasource.max-wait=10000
spring.datasource.initial-size=10
spring.datasource.max-active=100
spring.datasource.min-idle=10
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment