【7.6.0】【config】简化config接口

pull/57/head
fengshuonan 2023-06-27 22:10:58 +08:00
parent 0a988d6133
commit 6881c5eeb4
3 changed files with 0 additions and 35 deletions

View File

@ -60,16 +60,4 @@ public class SystemConfigController {
return new SuccessResponseData<>(sysConfigService.getInitConfigs());
}
/**
*
*
* @author fengshuonan
* @since 2021/7/8 16:36
*/
@GetResource(name = "获取后端服务部署的地址", path = "/sysConfig/getBackendDeployUrl", requiredLogin = false)
public ResponseData<String> getBackendDeployUrl() {
String serverDeployHost = sysConfigService.getServerDeployHost();
return new SuccessResponseData<>(serverDeployHost);
}
}

View File

@ -103,11 +103,4 @@ public interface SysConfigService extends IService<SysConfig>, InitConfigApi {
*/
InitConfigResponse getInitConfigs();
/**
*
*
* @author fengshuonan
* @since 2022/3/3 14:23
*/
String getServerDeployHost();
}

View File

@ -31,7 +31,6 @@ import cn.hutool.core.util.StrUtil;
import cn.hutool.extra.spring.SpringUtil;
import cn.stylefeng.roses.kernel.config.api.ConfigInitCallbackApi;
import cn.stylefeng.roses.kernel.config.api.ConfigInitStrategyApi;
import cn.stylefeng.roses.kernel.config.api.constants.ConfigConstants;
import cn.stylefeng.roses.kernel.config.api.context.ConfigContext;
import cn.stylefeng.roses.kernel.config.api.exception.ConfigException;
import cn.stylefeng.roses.kernel.config.api.exception.enums.ConfigExceptionEnum;
@ -252,21 +251,6 @@ public class SysConfigServiceImpl extends ServiceImpl<SysConfigMapper, SysConfig
return initConfigResponse;
}
@Override
public String getServerDeployHost() {
// 获取后端部署的服务器
LambdaQueryWrapper<SysConfig> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(SysConfig::getConfigCode, ConfigConstants.SYS_SERVER_DEPLOY_HOST);
SysConfig sysConfig = this.getOne(wrapper, false);
if (sysConfig != null) {
return sysConfig.getConfigValue();
} else {
return RuleConstants.DEFAULT_SERVER_DEPLOY_HOST;
}
}
/**
*
*