feat: w06 类型推断增强辅助
All checks were successful
缓存序列化结构检查 / cache-schema-check (push) Has been skipped
All checks were successful
缓存序列化结构检查 / cache-schema-check (push) Has been skipped
This commit is contained in:
21
docs/配置说明.md
21
docs/配置说明.md
@@ -43,6 +43,7 @@ include_modules:
|
||||
由 `redisCheck` 仓库维护,随 jar 发布,默认包含:
|
||||
|
||||
- `detection.patterns`:**W01~W05**(JSON 字符串写入 + Template 直写 + Hash)
|
||||
- `detection.read_hints_enabled`:W06 读侧反序列化类型辅助(默认 true)
|
||||
- `ignore.key_patterns`(锁 / 计数器 / token)
|
||||
- `detection.min_confidence`、`max_field_depth`
|
||||
- `mode: notify`、`enabled: true`
|
||||
@@ -106,6 +107,9 @@ detection:
|
||||
- W04 # redisTemplate 直写对象
|
||||
- W05 # opsForHash().put
|
||||
|
||||
# W06:读侧反序列化类型辅助(不产生独立告警)
|
||||
read_hints_enabled: true
|
||||
|
||||
# 类型推断最低置信度,低于此值标记为低置信度提示
|
||||
min_confidence: 0.6
|
||||
|
||||
@@ -211,6 +215,23 @@ detection:
|
||||
patterns: [W01, W02, W03]
|
||||
```
|
||||
|
||||
### 3.5.1 detection.read_hints_enabled(W06 辅助)
|
||||
|
||||
| 字段 | 类型 | 默认 | 说明 |
|
||||
|------|------|------|------|
|
||||
| `read_hints_enabled` | boolean | true | 扫描 `parseObject` / `parseArray` / `getJsonToBean` 等,补强同文件或同 key 写入点的 value 类型 |
|
||||
|
||||
- **不是写入模式**:不会单独因为「多了一处 parse」而告警
|
||||
- 能关联到 `redis get(key)` 时,还可补强 unresolved key
|
||||
- 覆盖优先级:`manual_mappings` > W06 > 写侧 AST
|
||||
|
||||
关闭示例:
|
||||
|
||||
```yaml
|
||||
detection:
|
||||
read_hints_enabled: false
|
||||
```
|
||||
|
||||
### 3.6 manual_mappings
|
||||
|
||||
当自动推断不准确时使用。匹配优先级 **高于** 自动推断(按 `类全名#方法名` 覆盖 key 模式与 value 类型)。
|
||||
|
||||
Reference in New Issue
Block a user