迁移新服务器,修改配置文件

This commit is contained in:
YunaiV 2020-07-01 19:23:55 +08:00
parent 25c3b3cb89
commit 1e4ef483a7
4 changed files with 10 additions and 13 deletions

View File

@ -1,7 +1,6 @@
package cn.iocoder.mall.system.biz.config; package cn.iocoder.mall.system.biz.config;
import cn.iocoder.common.framework.util.ServiceExceptionUtil; 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.enums.SystemErrorCodeEnum;
import cn.iocoder.mall.system.biz.service.errorcode.ErrorCodeService; import cn.iocoder.mall.system.biz.service.errorcode.ErrorCodeService;
import org.springframework.beans.factory.annotation.Autowired; 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.annotation.Configuration;
import org.springframework.context.event.EventListener; import org.springframework.context.event.EventListener;
import java.util.List;
@Configuration @Configuration
public class ServiceExceptionConfiguration { public class ServiceExceptionConfiguration {
@ -20,14 +17,16 @@ public class ServiceExceptionConfiguration {
@EventListener(ApplicationReadyEvent.class) // 可参考 https://www.cnblogs.com/ssslinppp/p/7607509.html @EventListener(ApplicationReadyEvent.class) // 可参考 https://www.cnblogs.com/ssslinppp/p/7607509.html
public void initMessages() { public void initMessages() {
errorCodeService.deleteSyStemErrorCode(SystemErrorCodeEnum.ADMIN_NOT_FOUND.getGroup()); // TODO FROM 芋艿 to 芋艿暂时注释掉有问题的
errorCodeService.addSystemErrorCodeList(SystemErrorCodeEnum.values()); // errorCodeService.deleteSyStemErrorCode(SystemErrorCodeEnum.ADMIN_NOT_FOUND.getGroup());
// errorCodeService.addSystemErrorCodeList(SystemErrorCodeEnum.values());
for (SystemErrorCodeEnum item : SystemErrorCodeEnum.values()) { for (SystemErrorCodeEnum item : SystemErrorCodeEnum.values()) {
ServiceExceptionUtil.put(item.getCode(), item.getMessage()); ServiceExceptionUtil.put(item.getCode(), item.getMessage());
} }
for (ErrorCodeBO bo : errorCodeService.getErrorCodeByGroup(SystemErrorCodeEnum.ADMIN_NOT_FOUND.getGroup())) { // TODO FROM 芋艿 to 芋艿暂时注释掉有问题的
ServiceExceptionUtil.put(bo.getCode(),bo.getMessage()); // for (ErrorCodeBO bo : errorCodeService.getErrorCodeByGroup(SystemErrorCodeEnum.ADMIN_NOT_FOUND.getGroup())) {
} // ServiceExceptionUtil.put(bo.getCode(),bo.getMessage());
// }
} }
} }

View File

@ -3,7 +3,6 @@ package cn.iocoder.mall.system.biz.service.errorcode;
import cn.iocoder.common.framework.util.ServiceExceptionUtil; import cn.iocoder.common.framework.util.ServiceExceptionUtil;
import cn.iocoder.common.framework.vo.PageResult; import cn.iocoder.common.framework.vo.PageResult;
import cn.iocoder.mall.mybatis.enums.DeletedStatusEnum; 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.bo.errorcode.ErrorCodeBO;
import cn.iocoder.mall.system.biz.convert.errorcode.ErrorCodeConvert; import cn.iocoder.mall.system.biz.convert.errorcode.ErrorCodeConvert;
import cn.iocoder.mall.system.biz.dao.errorcode.ErrorCodeMapper; import cn.iocoder.mall.system.biz.dao.errorcode.ErrorCodeMapper;
@ -37,7 +36,6 @@ public class ErrorCodeServiceImpl extends ServiceImpl<ErrorCodeMapper, ErrorCode
@Override @Override
public List<ErrorCodeBO> getErrorCodeList(ErrorCodeGetListDTO errorCodeGetListDTO) { public List<ErrorCodeBO> getErrorCodeList(ErrorCodeGetListDTO errorCodeGetListDTO) {
// TODO FROM 芋艿 to 鱿鱼丝QueryWrapperX 只存在 mapper 不直接体现在 Service
return ErrorCodeConvert.INSTANCE.convertList(errorCodeMapper.selectListByIds(errorCodeGetListDTO.getIds())); return ErrorCodeConvert.INSTANCE.convertList(errorCodeMapper.selectListByIds(errorCodeGetListDTO.getIds()));
} }

View File

@ -1,7 +1,7 @@
spring: spring:
# 数据源配置项 # 数据源配置项
datasource: 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 driver-class-name: com.mysql.jdbc.Driver
username: root username: root
password: 3WLiVUBEwTbvAfsh password: 3WLiVUBEwTbvAfsh

View File

@ -4,11 +4,11 @@ spring:
nacos: nacos:
# Spring Cloud Nacos Discovery 配置项 # Spring Cloud Nacos Discovery 配置项
discovery: discovery:
server-addr: s1.iocoder.cn:8848 # Nacos 服务器地址 server-addr: 400-infra.server.iocoder.cn:8848 # Nacos 服务器地址
namespace: local # Nacos 命名空间 namespace: local # Nacos 命名空间
# Dubbo 配置项 # Dubbo 配置项
dubbo: dubbo:
# Dubbo 注册中心 # Dubbo 注册中心
registry: registry:
address: spring-cloud://s1.iocoder.cn:8848 # 指定 Dubbo 服务注册中心的地址 address: spring-cloud://400-infra.server.iocoder.cn:8848 # 指定 Dubbo 服务注册中心的地址