refactor(common-core): 新增通用配置 common-config , 简化 application配置

大部分情况下 common-config 一旦确定后续不修改,所以不需要写在 application 做一个简化

(cherry picked from commit 56f4b2fb915f3552e83ed4760772b13942ebd4d6)
This commit is contained in:
冷冷 committed 2024-08-16 15:26:53 +08:00
1 parent 2ece806760
commit c9d8c6a421
3 files changed
+44 -5

No files matched your search

@@ -22,18 +22,17 @@ file:
aj:
captcha:
water-mark: pig4cloud
cache-type: redis
# 登录报文加密根密钥 ,必须是16位
security:
# 登录报文加密根密钥 ,必须是16位
encodeKey: pigxpigxpigxpigx
# 配置文件加密根密码
jasypt:
encryptor:
password: pigx
algorithm: PBEWithMD5AndDES
iv-generator-classname: org.jasypt.iv.NoIvGenerator
# swagger 配置
# swagger token url 配置
swagger:
token-url: ${swagger.gateway}/admin/oauth2/token
@@ -0,0 +1,14 @@
package com.pig4cloud.pigx.common.core.config;
import com.pig4cloud.pigx.common.core.factory.YamlPropertySourceFactory;
import org.springframework.context.annotation.PropertySource;
/**
* 加载不可变配置项,这样的配置文件一舦是放在jar包中的,不会随着环境的变化而变化。
*
* @author lengleng
* @date 2024/7/20
*/
@PropertySource(value = "classpath:common-config.yml", factory = YamlPropertySourceFactory.class)
public class ImmutableConfiguration {
}
@@ -0,0 +1,26 @@
# 很多第三方组件的配置默认值一般均不需要改动,写在nacos 中比较混乱冗余,就可以写在此处
# sms4j配置
sms:
is-print: false
config-type: interface
sms-oa:
config-type: yaml
# 行为验证码配置
aj:
captcha:
cache-type: redis
# 配置文件加密方法
jasypt:
encryptor:
algorithm: PBEWithMD5AndDES
iv-generator-classname: org.jasypt.iv.NoIvGenerator
# liteflow配置
liteflow:
rule-source: rules/*-rule.xml
print-banner: false
print-execution-log: false
enable: true