refactor: 配置刷新优化和加密功能移除
- refactor(springboot2): 简化配置刷新逻辑,移除 EnvironmentChangeEvent 包装 - ConfigChangeHanlder 直接接收 Map<String,String> 参数 - 移除 EnvironmentChangeEvent 事件类 - 优化 token 参数构建和敏感信息脱敏处理 - refactor(server): 移除配置加密功能 - 删除 CryptoConfig 结构体和相关配置项 - 移除 application-dev.properties 中的加密配置 - 项目不再使用配置加密功能 - docs: 更新 README 和模块文档 - fix: 修复 Node.js 客户端配置缓存
This commit is contained in:
@@ -14,7 +14,6 @@ type Config struct {
|
||||
Server ServerConfig
|
||||
Database DatabaseConfig
|
||||
JWT JWTConfig
|
||||
Crypto CryptoConfig
|
||||
}
|
||||
|
||||
type ServerConfig struct {
|
||||
@@ -35,10 +34,6 @@ type JWTConfig struct {
|
||||
ExpireHours int
|
||||
}
|
||||
|
||||
type CryptoConfig struct {
|
||||
SecretKey string
|
||||
}
|
||||
|
||||
var Cfg *Config
|
||||
|
||||
func Load(path string) error {
|
||||
@@ -77,8 +72,6 @@ func Load(path string) error {
|
||||
Cfg.JWT.Secret = baseProps["jwt.secret"]
|
||||
Cfg.JWT.ExpireHours = intProp(baseProps, "jwt.expireHours", 24)
|
||||
|
||||
Cfg.Crypto.SecretKey = baseProps["crypto.secretKey"]
|
||||
|
||||
if Cfg.Database.Host == "" {
|
||||
return fmt.Errorf("missing required config: database.host")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user