Skip to content

参数配置 ​

INF-CONFIG-01 | 模块 infra | 把可变的业务参数(开关、阈值、文案)放到数据库,改完即时生效。

1. 使用角色与场景 ​

角色:管理员、运维

  • 调整登录失败锁定阈值
  • 按环境切换第三方地址

2. 接口与权限点 ​

方法路径权限点摘要代码行
POST/infra/config/createinfra:config:create创建参数配置ConfigController#L41
PUT/infra/config/updateinfra:config:update修改参数配置ConfigController#L48
DELETE/infra/config/deleteinfra:config:delete删除参数配置ConfigController#L56
DELETE/infra/config/delete-listinfra:config:delete批量删除参数配置ConfigController#L65
GET/infra/config/getinfra:config:query获得参数配置ConfigController#L74
GET/infra/config/get-value-by-key—根据参数键名查询参数值ConfigController#L82
GET/infra/config/pageinfra:config:query获取参数配置分页ConfigController#L96
GET/infra/config/export-excelinfra:config:export导出参数配置ConfigController#L104

3. 代码定位 ​

层位置
Controllermodules/infra/src/main/java/com/pmforge/module/infra/controller/admin/config/ConfigController.java#L41
DOmodules/infra/src/main/java/com/pmforge/module/infra/dal/dataobject/config/ConfigDO.java

4. 数据表 ​

表DO
infra_configConfigDO

5. 机制与配置 ​

  • 按 key 缓存读取;值为字符串,复杂结构自行序列化

6. 常见问题与排查 ​

  • 配置改了但服务端有本地缓存时,需要刷新缓存或等待过期

7. 关联 ​