Commit b8ca93b7 authored by tangtuo's avatar tangtuo

修改mysql地址

parent def699a0
......@@ -6,9 +6,9 @@ spring:
main:
allow-bean-definition-overriding: true #当遇到同样名字的时候,是否允许覆盖注册
datasource:
url: jdbc:mysql://172.16.101.135:3306/fzm_joying?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8
url: jdbc:mysql://172.16.101.136:3306/fzm_joying?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8
username: root
password: 123456
password: Joying@123456
platform: mysql
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
......
......@@ -6,9 +6,9 @@ spring:
main:
allow-bean-definition-overriding: true #当遇到同样名字的时候,是否允许覆盖注册
datasource:
url: jdbc:mysql://172.16.101.135:3306/fzm_joying?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8
url: jdbc:mysql://172.16.101.136:3306/fzm_joying?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8
username: root
password: 123456
password: Joying@123456
platform: mysql
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
......
......@@ -6,9 +6,9 @@ spring:
main:
allow-bean-definition-overriding: true #当遇到同样名字的时候,是否允许覆盖注册
datasource:
url: jdbc:mysql://172.16.101.135:3306/fzm_joying_test?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8
url: jdbc:mysql://172.16.101.136:3306/fzm_joying_test?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8
username: root
password: 123456
password: Joying@123456
platform: mysql
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
......
......@@ -41,21 +41,18 @@ public class GlobalExceptionHandler {
@ExceptionHandler(value = GlobalException.class)
public ResponseModel<String> handlerGlobalException(GlobalException globalException) {
log.error(globalException.getMessage(), globalException);
response.setStatus(HttpStatus.HTTP_INTERNAL_ERROR);
return ResponseModel.fail(globalException.getErrorCode(), globalException.getMessage());
}
@ExceptionHandler(value = Exception.class)
public ResponseModel<String> handlerException(Exception exception) {
log.error(exception.getMessage(), exception);
response.setStatus(HttpStatus.HTTP_INTERNAL_ERROR);
return ResponseModel.fail(exception);
}
@ExceptionHandler(value = SaTokenException.class)
public ResponseModel<String> handlerNotLoginException(SaTokenException exception) {
log.error(exception.getMessage(), exception);
response.setStatus(HttpStatus.HTTP_INTERNAL_ERROR);
if (exception instanceof NotLoginException) {
if (exception.getMessage().contains("token已被顶下线")) {
// 获取已过期的token
......@@ -88,7 +85,6 @@ public class GlobalExceptionHandler {
@ExceptionHandler(value = {MethodArgumentNotValidException.class})
public ResponseModel<String> handleMethodArgumentNotValidException(MethodArgumentNotValidException e) {
log.error(e.getMessage(), e);
response.setStatus(HttpStatus.HTTP_INTERNAL_ERROR);
List<ObjectError> allErrors = e.getBindingResult().getAllErrors();
String errorMsg = allErrors.
stream().
......
......@@ -4,9 +4,9 @@ spring:
main:
allow-bean-definition-overriding: true #当遇到同样名字的时候,是否允许覆盖注册
datasource:
url: jdbc:mysql://172.16.101.135:3306/fzm_joying?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8
url: jdbc:mysql://172.16.101.136:3306/fzm_joying?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8
username: root
password: 123456
password: Joying@123456
platform: mysql
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
......
......@@ -4,9 +4,9 @@ spring:
main:
allow-bean-definition-overriding: true #当遇到同样名字的时候,是否允许覆盖注册
datasource:
url: jdbc:mysql://172.16.101.135:3306/fzm_joying?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8
url: jdbc:mysql://172.16.101.136:3306/fzm_joying?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8
username: root
password: 123456
password: Joying@123456
platform: mysql
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
......
......@@ -4,9 +4,9 @@ spring:
main:
allow-bean-definition-overriding: true #当遇到同样名字的时候,是否允许覆盖注册
datasource:
url: jdbc:mysql://172.16.101.135:3306/fzm_joying_test?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8
url: jdbc:mysql://172.16.101.136:3306/fzm_joying_test?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8
username: root
password: 123456
password: Joying@123456
platform: mysql
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
......
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