🔨 更新 spring 配置描述文件.
This commit is contained in:
@@ -1,13 +1,13 @@
|
|||||||
package com.orion.visor.framework.common.constant;
|
package com.orion.visor.framework.common.constant;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 路径常量
|
* 文件常量
|
||||||
*
|
*
|
||||||
* @author Jiahang Li
|
* @author Jiahang Li
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @since 2024/4/17 10:35
|
* @since 2024/4/17 10:35
|
||||||
*/
|
*/
|
||||||
public interface PathConst {
|
public interface FileConst {
|
||||||
|
|
||||||
String ERROR_LOG = "error.log";
|
String ERROR_LOG = "error.log";
|
||||||
|
|
||||||
@@ -20,6 +20,11 @@ public enum EndpointDefine {
|
|||||||
*/
|
*/
|
||||||
UPLOAD_SWAP("/upload/swap/{}"),
|
UPLOAD_SWAP("/upload/swap/{}"),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量执行日志
|
||||||
|
*/
|
||||||
|
EXEC_LOG("/exec/{}/{}.log"),
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
{
|
{
|
||||||
"name": "orion.async.executor.core-pool-size",
|
"name": "orion.async.executor.core-pool-size",
|
||||||
"type": "java.lang.Integer",
|
"type": "java.lang.Integer",
|
||||||
"description": "核心线程数量",
|
"description": "核心线程数量.",
|
||||||
"defaultValue": "8"
|
"defaultValue": "8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.orion.visor.framework.log.configuration.config;
|
package com.orion.visor.framework.log.configuration.config;
|
||||||
|
|
||||||
import com.orion.visor.framework.common.utils.ConfigUtils;
|
import com.orion.visor.framework.common.utils.ConfigUtils;
|
||||||
|
import com.orion.visor.framework.log.core.enums.LogPrinterMode;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
|
|
||||||
@@ -17,6 +18,11 @@ import java.util.List;
|
|||||||
@ConfigurationProperties("orion.logging.printer")
|
@ConfigurationProperties("orion.logging.printer")
|
||||||
public class LogPrinterConfig {
|
public class LogPrinterConfig {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类型
|
||||||
|
*/
|
||||||
|
private LogPrinterMode mode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 字段配置
|
* 字段配置
|
||||||
*/
|
*/
|
||||||
@@ -32,12 +38,31 @@ public class LogPrinterConfig {
|
|||||||
*/
|
*/
|
||||||
private String expression;
|
private String expression;
|
||||||
|
|
||||||
public void setField(LogPrinterFieldConfig field) {
|
|
||||||
this.field = field;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setHeaders(List<String> headers) {
|
public void setHeaders(List<String> headers) {
|
||||||
this.headers = ConfigUtils.parseStringList(headers, String::toLowerCase);
|
this.headers = ConfigUtils.parseStringList(headers, String::toLowerCase);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class LogPrinterFieldConfig {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 忽略的字段
|
||||||
|
*/
|
||||||
|
private List<String> ignore;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 脱敏的字段
|
||||||
|
*/
|
||||||
|
private List<String> desensitize;
|
||||||
|
|
||||||
|
public void setIgnore(List<String> ignore) {
|
||||||
|
this.ignore = ConfigUtils.parseStringList(ignore);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDesensitize(List<String> desensitize) {
|
||||||
|
this.desensitize = ConfigUtils.parseStringList(desensitize);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,36 +0,0 @@
|
|||||||
package com.orion.visor.framework.log.configuration.config;
|
|
||||||
|
|
||||||
import com.orion.visor.framework.common.utils.ConfigUtils;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 日志打印字段配置
|
|
||||||
*
|
|
||||||
* @author Jiahang Li
|
|
||||||
* @version 1.0.0
|
|
||||||
* @since 2023/6/28 22:36
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
public class LogPrinterFieldConfig {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 忽略的字段
|
|
||||||
*/
|
|
||||||
private List<String> ignore;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 脱敏的字段
|
|
||||||
*/
|
|
||||||
private List<String> desensitize;
|
|
||||||
|
|
||||||
public void setIgnore(List<String> ignore) {
|
|
||||||
this.ignore = ConfigUtils.parseStringList(ignore);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDesensitize(List<String> desensitize) {
|
|
||||||
this.desensitize = ConfigUtils.parseStringList(desensitize);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -2,9 +2,9 @@ package com.orion.visor.framework.security.configuration;
|
|||||||
|
|
||||||
import com.orion.visor.framework.common.constant.AutoConfigureOrderConst;
|
import com.orion.visor.framework.common.constant.AutoConfigureOrderConst;
|
||||||
import com.orion.visor.framework.common.crypto.ValueCrypto;
|
import com.orion.visor.framework.common.crypto.ValueCrypto;
|
||||||
import com.orion.visor.framework.security.configuration.config.CryptoConfig;
|
import com.orion.visor.framework.security.configuration.config.AesCryptoConfig;
|
||||||
import com.orion.visor.framework.security.core.crypto.PrimaryValueCrypto;
|
import com.orion.visor.framework.security.core.crypto.PrimaryValueCrypto;
|
||||||
import com.orion.visor.framework.security.core.crypto.aes.AesCryptoProcessor;
|
import com.orion.visor.framework.security.core.crypto.processor.AesCryptoProcessor;
|
||||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||||
import org.springframework.boot.autoconfigure.AutoConfigureOrder;
|
import org.springframework.boot.autoconfigure.AutoConfigureOrder;
|
||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||||
@@ -12,8 +12,6 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties
|
|||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Primary;
|
import org.springframework.context.annotation.Primary;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 项目加密解密配置
|
* 项目加密解密配置
|
||||||
*
|
*
|
||||||
@@ -22,13 +20,10 @@ import javax.annotation.Resource;
|
|||||||
* @since 2023/7/7 23:59
|
* @since 2023/7/7 23:59
|
||||||
*/
|
*/
|
||||||
@AutoConfiguration
|
@AutoConfiguration
|
||||||
@EnableConfigurationProperties(CryptoConfig.class)
|
@EnableConfigurationProperties({AesCryptoConfig.class})
|
||||||
@AutoConfigureOrder(AutoConfigureOrderConst.FRAMEWORK_SECURITY_CRYPTO)
|
@AutoConfigureOrder(AutoConfigureOrderConst.FRAMEWORK_SECURITY_CRYPTO)
|
||||||
public class OrionCryptoAutoConfiguration {
|
public class OrionCryptoAutoConfiguration {
|
||||||
|
|
||||||
@Resource
|
|
||||||
private CryptoConfig config;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return 默认加密器
|
* @return 默认加密器
|
||||||
*/
|
*/
|
||||||
@@ -43,8 +38,8 @@ public class OrionCryptoAutoConfiguration {
|
|||||||
*/
|
*/
|
||||||
@Bean(initMethod = "init")
|
@Bean(initMethod = "init")
|
||||||
@ConditionalOnProperty(value = "orion.crypto.aes.enabled", havingValue = "true")
|
@ConditionalOnProperty(value = "orion.crypto.aes.enabled", havingValue = "true")
|
||||||
public ValueCrypto aesValueCrypto() {
|
public ValueCrypto aesValueCrypto(AesCryptoConfig config) {
|
||||||
return new AesCryptoProcessor(config.getAes());
|
return new AesCryptoProcessor(config);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.orion.visor.framework.security.core.crypto.aes;
|
package com.orion.visor.framework.security.configuration.config;
|
||||||
|
|
||||||
import com.orion.lang.utils.crypto.CryptoConst;
|
import com.orion.lang.utils.crypto.CryptoConst;
|
||||||
import com.orion.lang.utils.crypto.enums.PaddingMode;
|
import com.orion.lang.utils.crypto.enums.PaddingMode;
|
||||||
@@ -6,6 +6,7 @@ import com.orion.lang.utils.crypto.enums.WorkingMode;
|
|||||||
import com.orion.visor.framework.security.core.crypto.CryptoConfig;
|
import com.orion.visor.framework.security.core.crypto.CryptoConfig;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* aes 加密器配置
|
* aes 加密器配置
|
||||||
@@ -16,6 +17,7 @@ import lombok.EqualsAndHashCode;
|
|||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ConfigurationProperties("orion.crypto.aes")
|
||||||
public class AesCryptoConfig extends CryptoConfig {
|
public class AesCryptoConfig extends CryptoConfig {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
package com.orion.visor.framework.security.configuration.config;
|
|
||||||
|
|
||||||
import com.orion.visor.framework.security.core.crypto.aes.AesCryptoConfig;
|
|
||||||
import lombok.Data;
|
|
||||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 加密配置
|
|
||||||
*
|
|
||||||
* @author Jiahang Li
|
|
||||||
* @version 1.0.0
|
|
||||||
* @since 2023/7/8 0:01
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@ConfigurationProperties("orion.crypto")
|
|
||||||
public class CryptoConfig {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* aes 加密器配置
|
|
||||||
*/
|
|
||||||
private AesCryptoConfig aes;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.orion.visor.framework.security.core.crypto.aes;
|
package com.orion.visor.framework.security.core.crypto.processor;
|
||||||
|
|
||||||
import com.orion.lang.utils.Strings;
|
import com.orion.lang.utils.Strings;
|
||||||
import com.orion.lang.utils.crypto.Keys;
|
import com.orion.lang.utils.crypto.Keys;
|
||||||
@@ -6,6 +6,7 @@ import com.orion.lang.utils.crypto.enums.CipherAlgorithm;
|
|||||||
import com.orion.lang.utils.crypto.enums.WorkingMode;
|
import com.orion.lang.utils.crypto.enums.WorkingMode;
|
||||||
import com.orion.lang.utils.crypto.symmetric.SymmetricBuilder;
|
import com.orion.lang.utils.crypto.symmetric.SymmetricBuilder;
|
||||||
import com.orion.lang.utils.crypto.symmetric.SymmetricCrypto;
|
import com.orion.lang.utils.crypto.symmetric.SymmetricCrypto;
|
||||||
|
import com.orion.visor.framework.security.configuration.config.AesCryptoConfig;
|
||||||
import com.orion.visor.framework.security.core.crypto.CryptoProcessor;
|
import com.orion.visor.framework.security.core.crypto.CryptoProcessor;
|
||||||
|
|
||||||
import javax.crypto.SecretKey;
|
import javax.crypto.SecretKey;
|
||||||
@@ -5,15 +5,10 @@
|
|||||||
"type": "com.orion.visor.framework.security.configuration.config.SecurityConfig",
|
"type": "com.orion.visor.framework.security.configuration.config.SecurityConfig",
|
||||||
"sourceType": "com.orion.visor.framework.security.configuration.config.SecurityConfig"
|
"sourceType": "com.orion.visor.framework.security.configuration.config.SecurityConfig"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "orion.crypto",
|
|
||||||
"type": "com.orion.visor.framework.security.configuration.config.CryptoConfig",
|
|
||||||
"sourceType": "com.orion.visor.framework.security.configuration.config.CryptoConfig"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "orion.crypto.aes",
|
"name": "orion.crypto.aes",
|
||||||
"type": "com.orion.visor.framework.security.core.crypto.aes.AesCryptoConfig",
|
"type": "com.orion.visor.framework.security.configuration.config.AesCryptoConfig",
|
||||||
"sourceType": "com.orion.visor.framework.security.core.crypto.aes.AesCryptoConfig"
|
"sourceType": "com.orion.visor.framework.security.configuration.config.AesCryptoConfig"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"properties": [
|
"properties": [
|
||||||
@@ -2,7 +2,8 @@ package com.orion.visor.framework.storage.configuration;
|
|||||||
|
|
||||||
import com.orion.visor.framework.common.constant.AutoConfigureOrderConst;
|
import com.orion.visor.framework.common.constant.AutoConfigureOrderConst;
|
||||||
import com.orion.visor.framework.common.file.FileClient;
|
import com.orion.visor.framework.common.file.FileClient;
|
||||||
import com.orion.visor.framework.storage.configuration.config.StorageConfig;
|
import com.orion.visor.framework.storage.configuration.config.LocalStorageConfig;
|
||||||
|
import com.orion.visor.framework.storage.configuration.config.LogsStorageConfig;
|
||||||
import com.orion.visor.framework.storage.core.client.PrimaryFileClient;
|
import com.orion.visor.framework.storage.core.client.PrimaryFileClient;
|
||||||
import com.orion.visor.framework.storage.core.client.local.LocalFileClient;
|
import com.orion.visor.framework.storage.core.client.local.LocalFileClient;
|
||||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||||
@@ -12,8 +13,6 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties
|
|||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Primary;
|
import org.springframework.context.annotation.Primary;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 存储配置类
|
* 存储配置类
|
||||||
*
|
*
|
||||||
@@ -25,12 +24,9 @@ import javax.annotation.Resource;
|
|||||||
*/
|
*/
|
||||||
@AutoConfiguration
|
@AutoConfiguration
|
||||||
@AutoConfigureOrder(AutoConfigureOrderConst.FRAMEWORK_STORAGE)
|
@AutoConfigureOrder(AutoConfigureOrderConst.FRAMEWORK_STORAGE)
|
||||||
@EnableConfigurationProperties(StorageConfig.class)
|
@EnableConfigurationProperties({LocalStorageConfig.class, LogsStorageConfig.class})
|
||||||
public class OrionStorageAutoConfiguration {
|
public class OrionStorageAutoConfiguration {
|
||||||
|
|
||||||
@Resource
|
|
||||||
private StorageConfig config;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return 默认文件客户端
|
* @return 默认文件客户端
|
||||||
*/
|
*/
|
||||||
@@ -45,8 +41,8 @@ public class OrionStorageAutoConfiguration {
|
|||||||
*/
|
*/
|
||||||
@Bean
|
@Bean
|
||||||
@ConditionalOnProperty(value = "orion.storage.local.enabled", havingValue = "true")
|
@ConditionalOnProperty(value = "orion.storage.local.enabled", havingValue = "true")
|
||||||
public FileClient localFileClient() {
|
public FileClient localFileClient(LocalStorageConfig config) {
|
||||||
return new LocalFileClient(config.getLocal());
|
return new LocalFileClient(config);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -54,8 +50,8 @@ public class OrionStorageAutoConfiguration {
|
|||||||
*/
|
*/
|
||||||
@Bean
|
@Bean
|
||||||
@ConditionalOnProperty(value = "orion.storage.logs.enabled", havingValue = "true")
|
@ConditionalOnProperty(value = "orion.storage.logs.enabled", havingValue = "true")
|
||||||
public FileClient logsFileClient() {
|
public FileClient logsFileClient(LogsStorageConfig config) {
|
||||||
return new LocalFileClient(config.getLogs());
|
return new LocalFileClient(config);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package com.orion.visor.framework.storage.configuration.config;
|
||||||
|
|
||||||
|
import com.orion.visor.framework.storage.core.client.local.LocalFileClientConfig;
|
||||||
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本地存储配置
|
||||||
|
*
|
||||||
|
* @author Jiahang Li
|
||||||
|
* @version 1.0.0
|
||||||
|
* @since 2023/6/30 18:40
|
||||||
|
*/
|
||||||
|
@ConfigurationProperties(prefix = "orion.storage.local")
|
||||||
|
public class LocalStorageConfig extends LocalFileClientConfig {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package com.orion.visor.framework.storage.configuration.config;
|
||||||
|
|
||||||
|
import com.orion.visor.framework.storage.core.client.local.LocalFileClientConfig;
|
||||||
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 日志存储配置
|
||||||
|
*
|
||||||
|
* @author Jiahang Li
|
||||||
|
* @version 1.0.0
|
||||||
|
* @since 2023/6/30 18:40
|
||||||
|
*/
|
||||||
|
@ConfigurationProperties(prefix = "orion.storage.logs")
|
||||||
|
public class LogsStorageConfig extends LocalFileClientConfig {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
package com.orion.visor.framework.storage.configuration.config;
|
|
||||||
|
|
||||||
import com.orion.visor.framework.storage.core.client.local.LocalFileClientConfig;
|
|
||||||
import lombok.Data;
|
|
||||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 存储配置
|
|
||||||
*
|
|
||||||
* @author Jiahang Li
|
|
||||||
* @version 1.0.0
|
|
||||||
* @since 2023/6/30 18:40
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@ConfigurationProperties(prefix = "orion.storage")
|
|
||||||
public class StorageConfig {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 本地文件客户端 配置
|
|
||||||
*/
|
|
||||||
private LocalFileClientConfig local;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 日志文件客户端 配置
|
|
||||||
*/
|
|
||||||
private LocalFileClientConfig logs;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,19 +1,14 @@
|
|||||||
{
|
{
|
||||||
"groups": [
|
"groups": [
|
||||||
{
|
|
||||||
"name": "orion.storage",
|
|
||||||
"type": "com.orion.visor.framework.storage.configuration.config.StorageConfig",
|
|
||||||
"sourceType": "com.orion.visor.framework.storage.configuration.config.StorageConfig"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "orion.storage.local",
|
"name": "orion.storage.local",
|
||||||
"type": "com.orion.visor.framework.storage.core.client.local.LocalFileClientConfig",
|
"type": "com.orion.visor.framework.storage.configuration.config.LocalStorageConfig",
|
||||||
"sourceType": "com.orion.visor.framework.storage.core.client.local.LocalFileClientConfig"
|
"sourceType": "com.orion.visor.framework.storage.configuration.config.LocalStorageConfig"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "orion.storage.logs",
|
"name": "orion.storage.logs",
|
||||||
"type": "com.orion.visor.framework.storage.core.client.local.LocalFileClientConfig",
|
"type": "com.orion.visor.framework.storage.configuration.config.LogsStorageConfig",
|
||||||
"sourceType": "com.orion.visor.framework.storage.core.client.local.LocalFileClientConfig"
|
"sourceType": "com.orion.visor.framework.storage.configuration.config.LogsStorageConfig"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"properties": [
|
"properties": [
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
{
|
{
|
||||||
"name": "orion.websocket.prefix",
|
"name": "orion.websocket.prefix",
|
||||||
"type": "java.lang.String",
|
"type": "java.lang.String",
|
||||||
"description": "公共 websocket 前缀"
|
"description": "公共 websocket 前缀."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "orion.websocket.binary-buffer-size",
|
"name": "orion.websocket.binary-buffer-size",
|
||||||
@@ -14,25 +14,30 @@
|
|||||||
"name": "app.exec-log",
|
"name": "app.exec-log",
|
||||||
"type": "com.orion.visor.module.asset.define.config.AppExecLogConfig",
|
"type": "com.orion.visor.module.asset.define.config.AppExecLogConfig",
|
||||||
"sourceType": "com.orion.visor.module.asset.define.config.AppExecLogConfig"
|
"sourceType": "com.orion.visor.module.asset.define.config.AppExecLogConfig"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "app.auto-clear.exec-log",
|
||||||
|
"type": "com.orion.visor.module.asset.define.config.AppExecLogAutoClearConfig",
|
||||||
|
"sourceType": "com.orion.visor.module.asset.define.config.AppExecLogAutoClearConfig"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"properties": [
|
"properties": [
|
||||||
{
|
{
|
||||||
"name": "app.tracker.offset",
|
"name": "app.tracker.offset",
|
||||||
"type": "java.lang.Integer",
|
"type": "java.lang.Integer",
|
||||||
"description": "加载偏移量 (行)",
|
"description": "加载偏移量 (行).",
|
||||||
"defaultValue": "300"
|
"defaultValue": "300"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "app.tracker.delay",
|
"name": "app.tracker.delay",
|
||||||
"type": "java.lang.Integer",
|
"type": "java.lang.Integer",
|
||||||
"description": "延迟时间 (ms)",
|
"description": "延迟时间 (ms).",
|
||||||
"defaultValue": "100"
|
"defaultValue": "100"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "app.tracker.wait-times",
|
"name": "app.tracker.wait-times",
|
||||||
"type": "java.lang.Integer",
|
"type": "java.lang.Integer",
|
||||||
"description": "文件未找到等待次数",
|
"description": "文件未找到等待次数.",
|
||||||
"defaultValue": "100"
|
"defaultValue": "100"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -54,16 +59,14 @@
|
|||||||
"defaultValue": "true"
|
"defaultValue": "true"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "app.exec-log.auto-clear",
|
"name": "app.auto-clear.exec-log.enabled",
|
||||||
"type": "java.lang.Boolean",
|
"type": "java.lang.Boolean",
|
||||||
"description": "自动清理执行文件.",
|
"description": "开启 批量执行日志文件自动清理."
|
||||||
"defaultValue": "true"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "app.exec-log.keep-period",
|
"name": "app.auto-clear.exec-log.keep-period",
|
||||||
"type": "java.lang.Integer",
|
"type": "java.lang.Integer",
|
||||||
"description": "保留周期 (天)",
|
"description": "批量执行日志文件自动清理 保留周期 (天)."
|
||||||
"defaultValue": "30"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -27,7 +27,7 @@ import java.util.Map;
|
|||||||
public class PreferenceUpdatePartialRequest implements Serializable {
|
public class PreferenceUpdatePartialRequest implements Serializable {
|
||||||
|
|
||||||
@NotBlank
|
@NotBlank
|
||||||
@Size(max = 12)
|
@Size(max = 16)
|
||||||
@Schema(description = "类型")
|
@Schema(description = "类型")
|
||||||
private String type;
|
private String type;
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ import java.io.Serializable;
|
|||||||
public class PreferenceUpdateRequest implements Serializable {
|
public class PreferenceUpdateRequest implements Serializable {
|
||||||
|
|
||||||
@NotBlank
|
@NotBlank
|
||||||
@Size(max = 12)
|
@Size(max = 16)
|
||||||
@Schema(description = "类型")
|
@Schema(description = "类型")
|
||||||
private String type;
|
private String type;
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import qs from 'query-string';
|
import qs from 'query-string';
|
||||||
|
|
||||||
type PreferenceType = 'SYSTEM' | 'TERMINAL'
|
export type PreferenceType = 'SYSTEM' | 'TERMINAL'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户偏好更新请求-单个
|
* 用户偏好更新请求-单个
|
||||||
|
|||||||
12
orion-visor-ui/src/store/modules/cache/index.ts
vendored
12
orion-visor-ui/src/store/modules/cache/index.ts
vendored
@@ -2,6 +2,8 @@ import type { CacheState } from './types';
|
|||||||
import type { AxiosResponse } from 'axios';
|
import type { AxiosResponse } from 'axios';
|
||||||
import type { TagType } from '@/api/meta/tag';
|
import type { TagType } from '@/api/meta/tag';
|
||||||
import { getTagList } from '@/api/meta/tag';
|
import { getTagList } from '@/api/meta/tag';
|
||||||
|
import type { PreferenceType } from '@/api/user/preference';
|
||||||
|
import { getPreference } from '@/api/user/preference';
|
||||||
import { defineStore } from 'pinia';
|
import { defineStore } from 'pinia';
|
||||||
import { getUserList } from '@/api/user/user';
|
import { getUserList } from '@/api/user/user';
|
||||||
import { getRoleList } from '@/api/user/role';
|
import { getRoleList } from '@/api/user/role';
|
||||||
@@ -131,5 +133,15 @@ export default defineStore('cache', {
|
|||||||
return await this.load('execJob', getExecJobList, force);
|
return await this.load('execJob', getExecJobList, force);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 加载偏好
|
||||||
|
async loadPreference<T>(type: PreferenceType, force = false) {
|
||||||
|
return await this.load(`preference_${type}`, () => getPreference<T>(type), force);
|
||||||
|
},
|
||||||
|
|
||||||
|
// 加载偏好项
|
||||||
|
async loadPreferenceItem<T>(type: PreferenceType, item: string, force = false) {
|
||||||
|
return await this.load(`preference_${type}_${item}`, () => getPreference<T>(type, [item]), force);
|
||||||
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -3,6 +3,13 @@ import { dateFormat } from '@/utils';
|
|||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
|
title: 'id',
|
||||||
|
dataIndex: 'id',
|
||||||
|
slotName: 'id',
|
||||||
|
width: 100,
|
||||||
|
align: 'left',
|
||||||
|
fixed: 'left',
|
||||||
|
}, {
|
||||||
title: '连接用户',
|
title: '连接用户',
|
||||||
dataIndex: 'username',
|
dataIndex: 'username',
|
||||||
slotName: 'username',
|
slotName: 'username',
|
||||||
|
|||||||
@@ -3,6 +3,13 @@ import { dateFormat } from '@/utils';
|
|||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
|
title: 'id',
|
||||||
|
dataIndex: 'id',
|
||||||
|
slotName: 'id',
|
||||||
|
width: 100,
|
||||||
|
align: 'left',
|
||||||
|
fixed: 'left',
|
||||||
|
}, {
|
||||||
title: '操作用户',
|
title: '操作用户',
|
||||||
dataIndex: 'username',
|
dataIndex: 'username',
|
||||||
slotName: 'username',
|
slotName: 'username',
|
||||||
|
|||||||
Reference in New Issue
Block a user