Files
UserclassService/.workbuddy/memory/2026-08-12.md
T
Allen dc217ca7a9 refactor: 根包由 com.bestsch.bschclassmanage 重命名为 com.yunhai.bschclassmanage
- git mv src/main/java/com/bestsch/bschclassmanage -> src/main/java/com/yunhai/bschclassmanage
- 255 个 Java 文件的 package/import 同步替换为 com.yunhai.bschclassmanage
- pom.xml 项目 groupId 设为 com.yunhai(与外部依赖 com.bestsch:bsch-* 无关,未改动)
- IDE 缓存 workspace.xml 路径同步更新(外部依赖坐标 com.bestsch:bsch-* 保持不动)
2026-08-12 17:21:22 +08:00

15 lines
1.5 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-08-12
## 项目:bschclassmanage(原 classicalchinese 重构)
### 已修复的三类启动/路由问题
1. **CORS 启动失败**:Spring Boot 2.7.18 (Spring 5.3) 校验 `allowCredentials=true` 时 `allowedOrigins` 不能含 `*`。已将 23 个 Controller 的 `@CrossOrigin(origins={"*","*"}, allowCredentials="true")` 改为 `originPatterns={"*"}`。
2. **/api/* 与 /oapi/* 接口 404**:`Config.API_PATH="/api/"` 与 `Config.OAPI="/oapi/"` 常量尾部带斜杠,拼接 `API_PATH+"/subject/"` 产生 `/api//subject/`(双斜杠)。Spring Boot 2.7 默认 PathPatternParser 不折叠双斜杠导致匹配失败。已将常量尾斜杠去掉(`/api`、`/oapi`、`/mobiapi`)。`LoginUserController` 单独用 `Config.API_PATH` 无拼接故正常。
3. **currentrole 取不到(500/NPE)**:`UserSysRoleArgumentResolver` 原只从请求头 `currentrole` 取身份 JSON(childId/roleId/schId),URL 参数被忽略导致 `curRole` 为 null。已改为「Header 优先,查不到退回 URL 参数 currentrole」,便于本地调试,生产仍走 Header。
### Git
- 提交 `66cd0f1`:包重命名为 `com.yunhai.bschclassmanage`,含以上修复。
- 远程 origin 指向 `http://gitea.yunhaixingtong.com/wanghu/BSChClassManage.git`(原 classicalchinese 旧地址已替换)。
- 已 `git push -u origin master` 成功。本地仓库级身份:Allen <allen@yunhaixingtong.com>。
- 注意:gitea http push 需账号密码;URL 中 `&` 须编码为 `%26`。