Skip to content

feat(profile): 添加配置文件静态类绑定功能,可根据环境加载特定文件#530

Open
kolnick wants to merge 8 commits into
iohao:mainfrom
kolnick:main
Open

feat(profile): 添加配置文件静态类绑定功能,可根据环境加载特定文件#530
kolnick wants to merge 8 commits into
iohao:mainfrom
kolnick:main

Conversation

@kolnick
Copy link
Copy Markdown
Contributor

@kolnick kolnick commented Jan 22, 2026

  • 新增 ProfileStaticBinder 类实现配置到静态字段的自动绑定
  • 新增 DbProps 测试类用于验证静态绑定功能
  • 扩展 ProfileManager 支持特定环境配置文件加载
  • 重构 Profile.load 方法提取为独立方法便于复用
  • 新增 ResourcePatternResolverProfile.getFileURL 方法按文件名查找资源

- 新增 ProfileStaticBinder 类实现配置到静态字段的自动绑定
- 新增 DbProps 测试类用于验证静态绑定功能
- 扩展 ProfileManager 支持特定环境配置文件加载
- 重构 Profile.load 方法提取为独立方法便于复用
- 新增 ResourcePatternResolverProfile.getFileURL 方法按文件名查找资源
- 移除实验性功能代码
- 新增 AbstractStaticBinder 抽象类统一配置绑定逻辑
- 添加 EnvStaticBinder 支持环境变量和配置文件合并绑定
- 修改 Profile 类中 map 类型从 Object 改为 String
- 更新 ProfileManager 中配置绑定调用方式
- 重构 ProfileStaticBinder 继承 AbstractStaticBinder 基类
- 在服务配置文件中新增 HttpExternalJoinSelector
@codacy-production
Copy link
Copy Markdown

codacy-production Bot commented May 7, 2026

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 39 complexity · 0 duplication

Metric Results
Complexity 39
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@kolnick
Copy link
Copy Markdown
Contributor Author

kolnick commented May 7, 2026 via email

@iohao
Copy link
Copy Markdown
Owner

iohao commented May 8, 2026

缺少 HttpExternalJoinSelector

kolnick added 3 commits May 9, 2026 02:24
- 引入 Lombok Getter 注解以自动生成 getter 方法
- 为 Profile 类的 map 字段添加 @Getter 注解
- 简化代码结构并提高可读性
- 添加 AbstractStaticBinder 抽象类,提供通用的数据绑定逻辑
- 添加 EnvStaticBinder 类,支持从环境变量和配置文件绑定数据
- 添加 Profile 类,用于配置文件管理域操作
- 修改 ProfileManager 的 loadEnvFileFillStaticClass 方法,支持多环境配置加载
- 更新 ProfileStaticBinder 以支持 Object 类型配置值
- 优化配置加载日志输出和错误处理机制
- 实现 ProfileManager 配置管理类,支持多环境配置加载
- 添加主配置加载功能,支持逗号分隔的目录列表
- 实现环境变量覆盖机制,系统环境变量可覆盖配置项
- 提供配置文件解析和合并功能,支持多环境配置覆盖
- 集成静态类绑定功能,自动将配置映射到静态字段
- 添加资源路径解析器,支持从 resources/conf 目录加载配置
- 实现无锁化并发安全的配置缓存机制
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants