|
@ -267,7 +267,7 @@ public class ConstantContextHolder {
|
|
|
String configValue = ConstantContext.me().getStr(configCode);
|
|
|
if (ObjectUtil.isEmpty(configValue)) {
|
|
|
// 将默认值加入到缓存常量
|
|
|
log.warn("系统配置sys_config表中存在空项,configCode为:{},系统采用默认值:{}", configCode, defaultValue);
|
|
|
log.warn(">>> 系统配置sys_config表中存在空项,configCode为:{},系统采用默认值:{}", configCode, defaultValue);
|
|
|
ConstantContext.me().put(configCode, defaultValue);
|
|
|
return defaultValue;
|
|
|
} else {
|
|
@ -292,7 +292,7 @@ public class ConstantContextHolder {
|
|
|
String configValue = ConstantContext.me().getStr(configCode);
|
|
|
if (ObjectUtil.isEmpty(configValue)) {
|
|
|
if (nullThrowExp) {
|
|
|
String format = StrUtil.format("系统配置sys_config表中存在空项,configCode为:{}", configCode);
|
|
|
String format = StrUtil.format(">>> 系统配置sys_config表中存在空项,configCode为:{}", configCode);
|
|
|
log.error(format);
|
|
|
throw new ServiceException(CONSTANT_EMPTY.getCode(), format);
|
|
|
} else {
|
|
@ -303,7 +303,7 @@ public class ConstantContextHolder {
|
|
|
return Convert.convert(clazz, configValue);
|
|
|
} catch (Exception e) {
|
|
|
if (nullThrowExp) {
|
|
|
String format = StrUtil.format("系统配置sys_config表中存在格式错误的值,configCode={},configValue={}", configCode, configValue);
|
|
|
String format = StrUtil.format(">>> 系统配置sys_config表中存在格式错误的值,configCode={},configValue={}", configCode, configValue);
|
|
|
log.error(format);
|
|
|
throw new ServiceException(CONSTANT_EMPTY.getCode(), format);
|
|
|
} else {
|