simple-starter/.workbuddy/memory/2026-11-14.md
2026-11-15 23:30:34 +08:00

38 lines
2.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 2026-11-14
## simple-starter 依赖版本审计与低风险升级
- 审计基线:Spring Boot 4.1.2 / Spring Cloud 2025.1.4 / Java 21,全量 `mvn -DskipTests compile` 通过。
- 项目已完成 SB4 适配改造(`mybatis-plus-spring-boot4-starter`、`sa-token-spring-boot4-starter`、`spring-boot-data-redis` 新模块、Jackson 3 `tools.jackson`),无需再动。
- 结论性判断:
- **JetCache 维持 2.7.9**(官方专为「兼容 SB4 + jackson3」发布,2.8.0.RC 是彻底重写且不兼容 2.7)。
- **Sentinel 维持 1.8.10**(2.0.0 仍是 alpha,官方 SB4 适配长期滞后)。
- **OpenTelemetry 维持 1.62.0**(正是 SB4.1.2 BOM 管理的版本,显式声明与 BOM 重复,不应偏离)。
- **CosId 维持 4.1.1**(5.0 完全重写零兼容,需 store 拆分 + 下游配置全改 + cosid-migration,项目用法极浅收益有限)。
## 本次已完成:低风险库小幅升级
在 `simple-starter-dependencies/pom.xml` 升级 9 个版本属性,全量 clean compile 通过(EXIT=0):
| 依赖 | 前 | 后 |
|---|---|---|
| Hutool | 5.8.47 | 5.8.48 |
| Tink | 1.16.0 | 1.24.0 |
| Nimbus JOSE JWT | 10.9.1 | 10.10 |
| OkHttp | 5.1.0 | 5.5.1 |
| Okio | 3.16.0 | 3.18.2 |
| AWS SDK | 2.57.9 | 2.59.1 |
| AWS CRT | 0.48.4 | 0.50.0 |
| swagger-annotations | 2.2.52 | 2.2.55 |
| jetcd | 0.8.5 | 0.8.8 |
## 移除 tianai-captcha 模块
- 删除子模块 `simple-starter-captcha/simple-starter-captcha-tianai`(此前新增的行为验证码封装,底层 `cloud.tianai.captcha` 核心库)。
- 清理 4 处引用:`simple-starter-captcha/pom.xml`(module)、`simple-starter-bom/pom.xml`(dependencyManagement)、`simple-starter-dependencies/pom.xml`(`tianai-captcha.version` 属性 + dependencyManagement)、`PropertiesConstants.CAPTCHA_TIANAI` 常量。
- 全量 `mvn -DskipTests clean compile` 通过;全仓 grep 确认无 tianai 残留。
## 分布式 ID 选型备忘(本次讨论结论)
- 项目对 CosId 用法极浅:仅 `simple-starter-data-mp` 的 `MyBatisPlusCosIdIdentifierGenerator` 用 `SnowflakeId` 当主键,`@Qualifier("__share__SnowflakeId")`,无 @CosId 注解、无 store。
- 若未来去 CosId,首选「MyBatis Plus 内置 DefaultIdentifierGenerator + Redisson 协调 workerId」(零新依赖,解决容器化 MAC/PID 相同导致的 workerId 冲突);次选美团 Leaf 号段;Redis INCR 作轻量兜底。