mirror of https://gitee.com/stylefeng/roses
【8.0】【config】清空一些没用的配置
parent
ae47a621a3
commit
91f3d46534
|
@ -32,7 +32,6 @@ public class DefaultStrategyImpl implements ConfigInitStrategyApi {
|
|||
@Override
|
||||
public List<ConfigInitItem> getInitConfigs() {
|
||||
ArrayList<ConfigInitItem> configInitItems = new ArrayList<>();
|
||||
configInitItems.add(new ConfigInitItem("系统名称", "SYS_SYSTEM_NAME", "Guns快速开发平台", "系统名称"));
|
||||
configInitItems.add(new ConfigInitItem("服务部署的访问地址", "SYS_SERVER_DEPLOY_HOST", "http://localhost:8080", "一般用在拼接文件的访问地址,注意,一定要配置连到后台的地址"));
|
||||
configInitItems.add(new ConfigInitItem("websocket的ws-url", "WEB_SOCKET_WS_URL", "ws://localhost:8080/webSocket/{token}", "websocket模块的连接url,用在消息通知模块,注意,一定要配置连到后台的地址"));
|
||||
configInitItems.add(new ConfigInitItem("auth认证用的jwt秘钥", "SYS_AUTH_JWT_SECRET", RandomUtil.randomString(30), "用于校验登录token,已随机生成一个30位密钥,请放心使用"));
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
*/
|
||||
package cn.stylefeng.roses.kernel.file.api.expander;
|
||||
|
||||
import cn.hutool.core.util.RandomUtil;
|
||||
import cn.stylefeng.roses.kernel.config.api.context.ConfigContext;
|
||||
import cn.stylefeng.roses.kernel.file.api.constants.FileConstants;
|
||||
import cn.stylefeng.roses.kernel.file.api.pojo.props.LocalFileProperties;
|
||||
|
@ -70,23 +69,6 @@ public class FileConfigExpander {
|
|||
return ConfigContext.me().getSysConfigValueWithDefault("SYS_DEFAULT_FILE_TIMEOUT_SECONDS", Long.class, FileConstants.DEFAULT_FILE_TIMEOUT_SECONDS);
|
||||
}
|
||||
|
||||
/**
|
||||
* 用于专门给文件鉴权用的jwt的密钥,没配置的话会自动随机生成
|
||||
* <p>
|
||||
* 默认不写死,防止漏洞
|
||||
*
|
||||
* @author fengshuonan
|
||||
* @since 2020/11/29 16:13
|
||||
*/
|
||||
public static String getFileAuthJwtSecret() {
|
||||
String defaultFileTimeoutSeconds = ConfigContext.me().getConfigValueNullable("SYS_DEFAULT_FILE_AUTH_JWT_SECRET", String.class);
|
||||
if (defaultFileTimeoutSeconds == null) {
|
||||
return RandomUtil.randomString(20);
|
||||
} else {
|
||||
return defaultFileTimeoutSeconds;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 本地文件存储位置(linux)
|
||||
*
|
||||
|
|
|
@ -35,30 +35,6 @@ import cn.stylefeng.roses.kernel.log.api.constants.LogFileConstants;
|
|||
*/
|
||||
public class LogConfigExpander {
|
||||
|
||||
/**
|
||||
* 获取日志记录的文件存储的位置(windows服务器)
|
||||
* <p>
|
||||
* 末尾不带斜杠
|
||||
*
|
||||
* @author fengshuonan
|
||||
* @since 2020/10/28 16:14
|
||||
*/
|
||||
public static String getLogFileSavePathWindows() {
|
||||
return ConfigContext.me().getSysConfigValueWithDefault("SYS_LOG_FILE_SAVE_PATH_WINDOWS", String.class, LogFileConstants.DEFAULT_FILE_SAVE_PATH_WINDOWS);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取日志记录的文件存储的位置(linux和mac服务器)
|
||||
* <p>
|
||||
* 末尾不带斜杠
|
||||
*
|
||||
* @author fengshuonan
|
||||
* @since 2020/10/28 16:14
|
||||
*/
|
||||
public static String getLogFileSavePathLinux() {
|
||||
return ConfigContext.me().getSysConfigValueWithDefault("SYS_LOG_FILE_SAVE_PATH_LINUX", String.class, LogFileConstants.DEFAULT_FILE_SAVE_PATH_LINUX);
|
||||
}
|
||||
|
||||
/**
|
||||
* 全局日志记录,如果开启则所有请求都将记录日志
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue