Files
loan-pricing/docs/superpowers/plans/2026-04-16-tongweb-access-backend-plan.md

28 lines
1.7 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.
# TongWeb 接入后端实施文档
## 目标
按照 `tongweb/2026-04-16-TongWeb接入全流程通用指南.md` 在当前后端工程中接入东方通 TongWeb替换默认内嵌 Tomcat并将 license 文件随 `ruoyi-admin` 启动模块一起打包。
## 实施内容
1.`ruoyi-admin/pom.xml` 增加 TongWeb Maven 仓库。
2.`ruoyi-admin/pom.xml``ruoyi-framework``ruoyi-loan-pricing` 依赖排除 `spring-boot-starter-tomcat`
3.`ruoyi-admin/pom.xml` 引入 `com.tongweb.springboot:tongweb-spring-boot-starter-3.x:7.0.E.7`
4. 将 TongWeb license 复制到 `ruoyi-admin/src/main/resources/license.dat`,并在 `application.yml` 中配置 `server.tongweb.license.path=classpath:license.dat`
5. 增加资源存在性测试,验证 `license.dat` 可从 classpath 加载。
6. 执行后端构建、依赖树、打包产物和测试验证,确认 TongWeb 依赖与 license 已正确接入。
## 变更说明
- 当前项目基于 Spring Boot 3.5.x因此实际接入使用 `tongweb-spring-boot-starter-3.x`,版本号延续指南中的 `7.0.E.7`
- license 按本次要求保持文件名为 `license.dat`,不改名为 `Tongweb_license.dat`
- 现有 `application-dev.yml``application-pro.yml``application-uat.yml` 中的 `server.tomcat` 参数暂时保留,后续以 TongWeb 实际启动结果为准决定是否继续清理。
## 验证步骤
1. `mvn -pl ruoyi-admin -Dtest=TongWebLicenseResourceTest test`
2. `mvn -pl ruoyi-admin -am package -DskipTests`
3. `jar tf ruoyi-admin/target/ruoyi-admin.jar | rg 'license.dat|tongweb'`
4. `mvn -pl ruoyi-admin dependency:tree '-Dincludes=com.tongweb.springboot:*,com.tongweb:*,org.springframework.boot:spring-boot-starter-tomcat,org.apache.tomcat.embed:*'`