迁移新服务器,修改配置文件
This commit is contained in:
parent
25c3b3cb89
commit
1e4ef483a7
@ -1,7 +1,6 @@
|
||||
package cn.iocoder.mall.system.biz.config;
|
||||
|
||||
import cn.iocoder.common.framework.util.ServiceExceptionUtil;
|
||||
import cn.iocoder.mall.system.biz.bo.errorcode.ErrorCodeBO;
|
||||
import cn.iocoder.mall.system.biz.enums.SystemErrorCodeEnum;
|
||||
import cn.iocoder.mall.system.biz.service.errorcode.ErrorCodeService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -9,8 +8,6 @@ import org.springframework.boot.context.event.ApplicationReadyEvent;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.event.EventListener;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Configuration
|
||||
public class ServiceExceptionConfiguration {
|
||||
|
||||
@ -20,14 +17,16 @@ public class ServiceExceptionConfiguration {
|
||||
|
||||
@EventListener(ApplicationReadyEvent.class) // 可参考 https://www.cnblogs.com/ssslinppp/p/7607509.html
|
||||
public void initMessages() {
|
||||
errorCodeService.deleteSyStemErrorCode(SystemErrorCodeEnum.ADMIN_NOT_FOUND.getGroup());
|
||||
errorCodeService.addSystemErrorCodeList(SystemErrorCodeEnum.values());
|
||||
// TODO FROM 芋艿 to 芋艿:暂时注释掉,有问题的。
|
||||
// errorCodeService.deleteSyStemErrorCode(SystemErrorCodeEnum.ADMIN_NOT_FOUND.getGroup());
|
||||
// errorCodeService.addSystemErrorCodeList(SystemErrorCodeEnum.values());
|
||||
for (SystemErrorCodeEnum item : SystemErrorCodeEnum.values()) {
|
||||
ServiceExceptionUtil.put(item.getCode(), item.getMessage());
|
||||
}
|
||||
for (ErrorCodeBO bo : errorCodeService.getErrorCodeByGroup(SystemErrorCodeEnum.ADMIN_NOT_FOUND.getGroup())) {
|
||||
ServiceExceptionUtil.put(bo.getCode(),bo.getMessage());
|
||||
}
|
||||
// TODO FROM 芋艿 to 芋艿:暂时注释掉,有问题的。
|
||||
// for (ErrorCodeBO bo : errorCodeService.getErrorCodeByGroup(SystemErrorCodeEnum.ADMIN_NOT_FOUND.getGroup())) {
|
||||
// ServiceExceptionUtil.put(bo.getCode(),bo.getMessage());
|
||||
// }
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -3,7 +3,6 @@ package cn.iocoder.mall.system.biz.service.errorcode;
|
||||
import cn.iocoder.common.framework.util.ServiceExceptionUtil;
|
||||
import cn.iocoder.common.framework.vo.PageResult;
|
||||
import cn.iocoder.mall.mybatis.enums.DeletedStatusEnum;
|
||||
import cn.iocoder.mall.mybatis.query.QueryWrapperX;
|
||||
import cn.iocoder.mall.system.biz.bo.errorcode.ErrorCodeBO;
|
||||
import cn.iocoder.mall.system.biz.convert.errorcode.ErrorCodeConvert;
|
||||
import cn.iocoder.mall.system.biz.dao.errorcode.ErrorCodeMapper;
|
||||
@ -37,7 +36,6 @@ public class ErrorCodeServiceImpl extends ServiceImpl<ErrorCodeMapper, ErrorCode
|
||||
|
||||
@Override
|
||||
public List<ErrorCodeBO> getErrorCodeList(ErrorCodeGetListDTO errorCodeGetListDTO) {
|
||||
// TODO FROM 芋艿 to 鱿鱼丝:QueryWrapperX 只存在 mapper 里,不直接体现在 Service
|
||||
return ErrorCodeConvert.INSTANCE.convertList(errorCodeMapper.selectListByIds(errorCodeGetListDTO.getIds()));
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
spring:
|
||||
# 数据源配置项
|
||||
datasource:
|
||||
url: jdbc:mysql://s1.iocoder.cn:3306/mall_system?useSSL=false&useUnicode=true&characterEncoding=UTF-8
|
||||
url: jdbc:mysql://400-infra.server.iocoder.cn:3306/mall_system?useSSL=false&useUnicode=true&characterEncoding=UTF-8
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
username: root
|
||||
password: 3WLiVUBEwTbvAfsh
|
||||
|
@ -4,11 +4,11 @@ spring:
|
||||
nacos:
|
||||
# Spring Cloud Nacos Discovery 配置项
|
||||
discovery:
|
||||
server-addr: s1.iocoder.cn:8848 # Nacos 服务器地址
|
||||
server-addr: 400-infra.server.iocoder.cn:8848 # Nacos 服务器地址
|
||||
namespace: local # Nacos 命名空间
|
||||
|
||||
# Dubbo 配置项
|
||||
dubbo:
|
||||
# Dubbo 注册中心
|
||||
registry:
|
||||
address: spring-cloud://s1.iocoder.cn:8848 # 指定 Dubbo 服务注册中心的地址
|
||||
address: spring-cloud://400-infra.server.iocoder.cn:8848 # 指定 Dubbo 服务注册中心的地址
|
||||
|
Loading…
Reference in New Issue
Block a user