主题
参数配置
INF-CONFIG-01 | 模块
infra| 把可变的业务参数(开关、阈值、文案)放到数据库,改完即时生效。
1. 使用角色与场景
角色:管理员、运维
- 调整登录失败锁定阈值
- 按环境切换第三方地址
2. 接口与权限点
| 方法 | 路径 | 权限点 | 摘要 | 代码行 |
|---|---|---|---|---|
| POST | /infra/config/create | infra:config:create | 创建参数配置 | ConfigController#L41 |
| PUT | /infra/config/update | infra:config:update | 修改参数配置 | ConfigController#L48 |
| DELETE | /infra/config/delete | infra:config:delete | 删除参数配置 | ConfigController#L56 |
| DELETE | /infra/config/delete-list | infra:config:delete | 批量删除参数配置 | ConfigController#L65 |
| GET | /infra/config/get | infra:config:query | 获得参数配置 | ConfigController#L74 |
| GET | /infra/config/get-value-by-key | — | 根据参数键名查询参数值 | ConfigController#L82 |
| GET | /infra/config/page | infra:config:query | 获取参数配置分页 | ConfigController#L96 |
| GET | /infra/config/export-excel | infra:config:export | 导出参数配置 | ConfigController#L104 |
3. 代码定位
| 层 | 位置 |
|---|---|
| Controller | modules/infra/src/main/java/com/pmforge/module/infra/controller/admin/config/ConfigController.java#L41 |
| DO | modules/infra/src/main/java/com/pmforge/module/infra/dal/dataobject/config/ConfigDO.java |
4. 数据表
| 表 | DO |
|---|---|
infra_config | ConfigDO |
5. 机制与配置
- 按 key 缓存读取;值为字符串,复杂结构自行序列化
6. 常见问题与排查
- 配置改了但服务端有本地缓存时,需要刷新缓存或等待过期
7. 关联
- 需求原件:02-04-配置管理
- 相关卡片:INF-DS-01