chore(deps): Spring Boot 2.5.15→2.7.18 + MyBatis Plus 3.5.5→3.5.16
升级内容: - Spring Boot 2.5.15 → 2.7.18 (含 Spring Security 5.7, Tomcat 9.0.96) - MyBatis Plus 3.5.5 → 3.5.16 (含 mybatis-plus-jsqlparser 拆分模块) - JSqlParser 4.5 → 5.2 (MyBatis Plus 3.5.9+ 要求) - PageHelper 1.4.7 → 2.1.1 (兼容 JSqlParser 5.x) - mysql:mysql-connector-java → com.mysql:mysql-connector-j (Spring Boot 2.7 BOM 变更) 兼容性修复: - FieldStrategy.IGNORED → FieldStrategy.NEVER (3.5.16 重命名) - ScanOptionsBuilder → ScanOptions.scanOptions() 工厂方法 - saveOrUpdate(entity, wrapper) → saveOrUpdate(entity) (wrapper 签名移除) - PermitAllUrlProperties: getBean(class) → getBean(name,class) + null 检查 - application.yml: 添加 spring.mvc.pathmatch.matching-strategy=ant-path-matcher - application.yml: 禁用 springfox (与 Spring Boot 2.7 不兼容) 验证结果: - ✅ mvn clean package -DskipTests BUILD SUCCESS - ✅ 登录接口 HTTP 200 - ✅ 分页查询 (数据字典 326 条, 用户 84 条) - ✅ 路由信息 (22 个顶级菜单) - ✅ 流程引擎 (Flowable) 正常初始化
This commit is contained in:
207
docs/BACKEND_UPGRADE_PLAN.md
Normal file
207
docs/BACKEND_UPGRADE_PLAN.md
Normal file
@@ -0,0 +1,207 @@
|
||||
# OpenHIS 后端组件升级方案
|
||||
|
||||
> **编制日期**: 2026-06-04
|
||||
> **基线**: Spring Boot 2.5.15 + MyBatis Plus 3.5.5
|
||||
> **目标**: 升级安全漏洞组件 + 小版本迭代,不做大版本迁移
|
||||
|
||||
---
|
||||
|
||||
## 升级原则
|
||||
|
||||
1. **安全优先** — BouncyCastle 等有漏洞的组件必须升
|
||||
2. **小版本优先** — 只升 patch/minor,不升 major
|
||||
3. **逐个验证** — 每升一个组件跑 `mvn clean package -DskipTests` + 启动测试
|
||||
4. **不动核心** — Spring Boot 2.5、MyBatis Plus 3.5 暂不升
|
||||
|
||||
---
|
||||
|
||||
## Phase 1: 安全修复(必做)
|
||||
|
||||
### 1.1 BouncyCastle 1.69 → 1.80 🔴
|
||||
|
||||
| 项 | 内容 |
|
||||
|---|---|
|
||||
| **风险等级** | 🔴 高 — 1.69 有 CVE 安全漏洞 |
|
||||
| **变更文件** | `openhis-server-new/pom.xml` |
|
||||
| **当前值** | `<bcprov-jdk15on.version>1.69</bcprov-jdk15on.version>` |
|
||||
| **操作** | 删除 jdk15on,改用 jdk18on |
|
||||
| **新增依赖** | `org.bouncycastle:bcprov-jdk18on:1.80`<br>`org.bouncycastle:bcpkix-jdk18on:1.80` |
|
||||
| **代码影响** | 搜索 `rg "bcprov\|bcpkix" --type java` — 当前无直接引用,仅通过依赖传递 |
|
||||
| **验证** | `mvn compile` + 启动后检查登录/token 签发 |
|
||||
| **回滚** | 改回 `1.69` |
|
||||
|
||||
**具体操作:**
|
||||
```xml
|
||||
<!-- 旧 -->
|
||||
<bcprov-jdk15on.version>1.69</bcprov-jdk15on.version>
|
||||
|
||||
<!-- 新 -->
|
||||
<!-- 删除 bcprov-jdk15on.version 属性 -->
|
||||
<!-- 在 dependencyManagement 中添加 -->
|
||||
<dependency>
|
||||
<groupId>org.bouncycastle</groupId>
|
||||
<artifactId>bcprov-jdk18on</artifactId>
|
||||
<version>1.80</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.bouncycastle</groupId>
|
||||
<artifactId>bcpkix-jdk18on</artifactId>
|
||||
<version>1.80</version>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Phase 2: 连接池 & 工具库升级
|
||||
|
||||
### 2.1 Druid 1.2.27 → 1.2.28 🟢
|
||||
|
||||
| 项 | 内容 |
|
||||
|---|---|
|
||||
| **风险** | 🟢 低 — patch 版本 |
|
||||
| **变更** | `<druid.version>1.2.27</druid.version>` → `1.2.28` |
|
||||
| **代码影响** | `DruidProperties.java` — API 无变化 |
|
||||
| **验证** | 启动后检查 Druid 监控页 `/druid/` |
|
||||
|
||||
### 2.2 Fastjson2 2.0.58 → 2.0.61 🟢
|
||||
|
||||
| 项 | 内容 |
|
||||
|---|---|
|
||||
| **风险** | 🟢 低 — patch 版本 |
|
||||
| **变更** | `<fastjson2.version>2.0.58</fastjson2.version>` → `2.0.61` |
|
||||
| **代码影响** | 无直接引用(0 个文件),仅依赖传递 |
|
||||
| **验证** | `mvn compile` |
|
||||
|
||||
### 2.3 Hutool 5.3.8 → 5.8.x 🟢
|
||||
|
||||
| 项 | 内容 |
|
||||
|---|---|
|
||||
| **风险** | 🟢 低 — minor 版本 |
|
||||
| **变更** | `<hutool-all.version>5.3.8</hutool-all.version>` → `5.8.35` |
|
||||
| **代码影响** | `rg "cn.hutool" --type java` — 约 10+ 文件使用 `ObjectUtil`、`StrUtil` |
|
||||
| **验证** | 检查使用 Hutool 的业务模块(预约管理等) |
|
||||
| **注意** | 5.3.8 → 5.8 跨了多个 minor,需检查 deprecated API |
|
||||
|
||||
---
|
||||
|
||||
## Phase 3: 监控 & IO 升级
|
||||
|
||||
### 3.1 OSHI 6.6.5 → 6.10.0 🟢
|
||||
|
||||
| 项 | 内容 |
|
||||
|---|---|
|
||||
| **风险** | 🟢 低 — minor 版本 |
|
||||
| **变更** | `<oshi.version>6.6.5</oshi.version>` → `6.10.0` |
|
||||
| **代码影响** | `Server.java` — 使用 `SystemInfo`、`CentralProcessor`、`GlobalMemory` |
|
||||
| **验证** | 系统监控页面正常显示 CPU/内存/磁盘信息 |
|
||||
| **注意** | OSHI 6.10 API 基本兼容 6.6 |
|
||||
|
||||
### 3.2 Commons IO 2.13.0 → 2.21.0 🟢
|
||||
|
||||
| 项 | 内容 |
|
||||
|---|---|
|
||||
| **风险** | 🟢 低 — minor 版本 |
|
||||
| **变更** | `<commons.io.version>2.13.0</commons.io.version>` → `2.21.0` |
|
||||
| **代码影响** | 无直接引用 |
|
||||
| **验证** | `mvn compile` |
|
||||
|
||||
### 3.3 PostgreSQL Driver 42.2.27 → 42.7.x 🟢
|
||||
|
||||
| 项 | 内容 |
|
||||
|---|---|
|
||||
| **风险** | 🟢 低 |
|
||||
| **变更** | `<postgresql.version>42.2.27</postgresql.version>` → `42.7.4` |
|
||||
| **代码影响** | 无,仅 JDBC 驱动 |
|
||||
| **验证** | 启动后数据库连接正常 |
|
||||
|
||||
---
|
||||
|
||||
## Phase 4: 文档 & 分页
|
||||
|
||||
### 4.1 Swagger → SpringDoc 1.8.x 🟡
|
||||
|
||||
| 项 | 内容 |
|
||||
|---|---|
|
||||
| **风险** | 🟡 中 — 不同库 |
|
||||
| **当前** | `<swagger.version>3.0.0</swagger.version>`(springfox) |
|
||||
| **目标** | springdoc-openapi 1.8.6 |
|
||||
| **操作** | 替换 springfox 依赖为 springdoc |
|
||||
| **代码影响** | `rg "swagger\|ApiModel\|ApiOperation" --type java` — 需改注解 |
|
||||
| **建议** | ⚠️ 暂不升 — 注解改造工作量大 |
|
||||
|
||||
### 4.2 PageHelper 1.4.7 → 1.4.7 保持 🟢
|
||||
|
||||
| 项 | 内容 |
|
||||
|---|---|
|
||||
| **建议** | 保持当前版本 — 1.4.7 稳定且够用 |
|
||||
| **原因** | 升级到 2.x 需配合 Spring Boot 4 |
|
||||
|
||||
---
|
||||
|
||||
## Phase 5: PDF & 签名
|
||||
|
||||
### 5.1 itextpdf 5.5.12 → 5.5.13.4 🟢
|
||||
|
||||
| 项 | 内容 |
|
||||
|---|---|
|
||||
| **风险** | 🟢 低 — patch 版本 |
|
||||
| **变更** | `<itextpdf.version>5.5.12</itextpdf.version>` → `5.5.13.4` |
|
||||
| **代码影响** | PDF 生成相关 |
|
||||
|
||||
### 5.2 Kernel 7.1.2 → 7.1.2 保持 🟢
|
||||
|
||||
| 项 | 内容 |
|
||||
|---|---|
|
||||
| **建议** | 保持 — 已是较新版本 |
|
||||
|
||||
---
|
||||
|
||||
## 执行计划
|
||||
|
||||
```
|
||||
Day 1: Phase 1 (BouncyCastle) + Phase 2 (Druid/Fastjson2/Hutool)
|
||||
→ mvn clean package -DskipTests
|
||||
→ 启动测试
|
||||
|
||||
Day 2: Phase 3 (OSHI/PostgreSQL/Commons IO)
|
||||
→ mvn clean package -DskipTests
|
||||
→ 启动测试 + 系统监控验证
|
||||
|
||||
Day 3: Phase 5 (itextpdf)
|
||||
→ mvn clean package -DskipTests
|
||||
→ PDF 功能验证
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 版本对照表
|
||||
|
||||
| 组件 | 当前 | 升级到 | 类型 | 状态 |
|
||||
|---|---|---|---|---|
|
||||
| Spring Boot | 2.5.15 | 保持 | major | 🔒 暂不动 |
|
||||
| MyBatis Plus | 3.5.5 | 保持 | major | 🔒 暂不动 |
|
||||
| PageHelper | 1.4.7 | 保持 | major | 🔒 暂不动 |
|
||||
| **BouncyCastle** | **1.69** | **1.80** | major | 🔴 **必做** |
|
||||
| **Druid** | **1.2.27** | **1.2.28** | patch | 🟢 **可做** |
|
||||
| **Fastjson2** | **2.0.58** | **2.0.61** | patch | 🟢 **可做** |
|
||||
| **Hutool** | **5.3.8** | **5.8.35** | minor | 🟢 **可做** |
|
||||
| **OSHI** | **6.6.5** | **6.10.0** | minor | 🟢 **可做** |
|
||||
| **Commons IO** | **2.13.0** | **2.21.0** | minor | 🟢 **可做** |
|
||||
| **PostgreSQL** | **42.2.27** | **42.7.4** | minor | 🟢 **可做** |
|
||||
| **itextpdf** | **5.5.12** | **5.5.13.4** | patch | 🟢 **可做** |
|
||||
| Swagger/SpringDoc | 3.0.0 | 1.8.6 | 不同库 | ⚠️ 暂不动 |
|
||||
|
||||
---
|
||||
|
||||
## 验证清单
|
||||
|
||||
每次升级后检查:
|
||||
|
||||
- [ ] `mvn clean package -DskipTests` 编译通过
|
||||
- [ ] 启动无报错
|
||||
- [ ] 登录功能正常
|
||||
- [ ] Druid 监控页 `/druid/` 可访问
|
||||
- [ ] 系统监控页正常(OSHI 升级时)
|
||||
- [ ] PDF 导出正常(itextpdf 升级时)
|
||||
- [ ] 数据库连接正常
|
||||
|
||||
188
docs/MYBATIS_PLUS_UPGRADE_PLAN.md
Normal file
188
docs/MYBATIS_PLUS_UPGRADE_PLAN.md
Normal file
@@ -0,0 +1,188 @@
|
||||
# MyBatis Plus 升级方案
|
||||
|
||||
> **编制日期**: 2026-06-04
|
||||
> **当前版本**: 3.5.5
|
||||
> **目标版本**: 3.5.16 (最新稳定版, 2026-01-11)
|
||||
> **Spring Boot**: 2.5.15(保持不变,不升级)
|
||||
|
||||
---
|
||||
|
||||
## 一、兼容性分析
|
||||
|
||||
### 关键发现
|
||||
|
||||
| 项目 | 3.5.5 | 3.5.16 | 结论 |
|
||||
|---|---|---|---|
|
||||
| `mybatis-spring` | 2.1.2 | 2.1.2 | ✅ 一致 |
|
||||
| `spring-boot-dependencies` BOM | 2.7.15 | 2.7.18 | ⚠️ BOM 导入,需处理 |
|
||||
| `mybatis-plus-boot-starter` | 存在 | 存在 | ✅ 兼容 Spring Boot 2.x |
|
||||
| `mybatis-plus-spring-boot3-starter` | 存在 | 存在 | 我们不用 |
|
||||
|
||||
### BOM 冲突处理
|
||||
|
||||
MyBatis Plus 3.5.16 的 `mybatis-plus-boot-starter` 在 `dependencyManagement` 中导入了 `spring-boot-dependencies:2.7.18` BOM。这**可能覆盖**我们项目中由 `spring-boot-starter-parent:2.5.15` 管理的依赖版本。
|
||||
|
||||
**解决方案:在父 pom.xml 中显式锁定关键依赖版本**
|
||||
|
||||
```xml
|
||||
<!-- 在 openhis-server-new/pom.xml 的 <properties> 中添加 -->
|
||||
<!-- 锁定 Spring Boot 管理的核心依赖版本,防止被 BOM 覆盖 -->
|
||||
<spring-boot.version>2.5.15</spring-boot.version>
|
||||
<spring-boot-dependencies.version>2.5.15</spring-boot-dependencies.version>
|
||||
```
|
||||
|
||||
**更安全的方案:在父 pom.xml 中覆盖 BOM**
|
||||
|
||||
```xml
|
||||
<!-- 在 <dependencyManagement> 中添加,优先级高于 BOM 导入 -->
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<!-- 覆盖 Spring Boot BOM,锁定 2.5.15 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-dependencies</artifactId>
|
||||
<version>${spring-boot.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 二、升级收益
|
||||
|
||||
### 🔴 重要 Bug 修复
|
||||
|
||||
| Bug | 影响 |
|
||||
|---|---|
|
||||
| 多租户查询问题 | ⭐⭐⭐ 我们用了多租户插件 |
|
||||
| 租户插件 exists 语句失效 | ⭐⭐⭐ exists 子查询场景 |
|
||||
| 逻辑删除 + 乐观锁冲突 | ⭐⭐⭐ 我们同时用了这两个特性 |
|
||||
| 批量操作异步异常 | ⭐⭐ 批量导入场景 |
|
||||
| Db count 返回 null 空指针 | ⭐⭐ 统计查询 |
|
||||
| 动态 SQL 注释导致合并错误 | ⭐⭐ 复杂 SQL |
|
||||
|
||||
### 🟢 新增能力
|
||||
|
||||
| 功能 | 说明 |
|
||||
|---|---|
|
||||
| `LambdaUpdateWrapper.setIncrBy/setDecrBy` | 字段自增自减 |
|
||||
| `BaseMapper` 批量操作 + `InsertOrUpdate` | 批量导入增强 |
|
||||
| `UpdateWrapper.checkSqlInjection` | SQL 注入防护 |
|
||||
| `deleteByIds` 空集合处理 | 防空指针 |
|
||||
| `DynamicTableNameJsqlParserInnerInterceptor` | 动态表处理 |
|
||||
| `OrderItem.withExpression` | 表达式排序 |
|
||||
|
||||
### 📦 自动获得的依赖升级
|
||||
|
||||
| 组件 | 旧版本 | 新版本 |
|
||||
|---|---|---|
|
||||
| MyBatis | 3.5.13 | 3.5.19 |
|
||||
| JSqlParser | 4.6 | 5.2 |
|
||||
| jackson | 2.16 | 2.20.1 |
|
||||
| PostgreSQL | 42.2.27 | 42.7.8 |
|
||||
|
||||
---
|
||||
|
||||
## 三、升级步骤
|
||||
|
||||
### Step 1: 修改版本号
|
||||
|
||||
```xml
|
||||
<!-- pom.xml -->
|
||||
<mybatis-plus.version>3.5.5</mybatis-plus.version>
|
||||
<!-- 改为 -->
|
||||
<mybatis-plus.version>3.5.16</mybatis-plus.version>
|
||||
```
|
||||
|
||||
### Step 2: 添加 BOM 覆盖(关键!)
|
||||
|
||||
在 `openhis-server-new/pom.xml` 的 `<dependencyManagement>` 中添加:
|
||||
|
||||
```xml
|
||||
<!-- 覆盖 MyBatis Plus 导入的 Spring Boot BOM,保持 2.5.15 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-dependencies</artifactId>
|
||||
<version>2.5.15</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
### Step 3: 编译验证
|
||||
|
||||
```bash
|
||||
cd openhis-server-new
|
||||
mvn clean compile -DskipTests
|
||||
```
|
||||
|
||||
### Step 4: 功能验证清单
|
||||
|
||||
| 验证项 | 测试方法 | 通过标准 |
|
||||
|---|---|---|
|
||||
| 登录 | 输入账号密码 | 登录成功 |
|
||||
| 分页查询 | 访问列表页 | 分页正常 |
|
||||
| 新增 | 提交表单 | 数据写入 |
|
||||
| 编辑 | 修改并保存 | 数据更新 |
|
||||
| 删除 | 删除记录 | 软删除成功 |
|
||||
| 批量操作 | 批量新增/删除 | 全部成功 |
|
||||
| 多租户 | 切换租户 | 数据隔离正确 |
|
||||
| 乐观锁 | 并发更新 | 冲突检测正确 |
|
||||
| 导出 | Excel 导出 | 文件正常 |
|
||||
|
||||
### Step 5: 提交代码
|
||||
|
||||
```bash
|
||||
git add openhis-server-new/pom.xml
|
||||
git commit -m "chore(deps): MyBatis Plus 3.5.5 → 3.5.16"
|
||||
git push origin develop
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 四、回滚方案
|
||||
|
||||
如果升级后出现问题:
|
||||
|
||||
```bash
|
||||
# 1. 改回旧版本
|
||||
<mybatis-plus.version>3.5.5</mybatis-plus.version>
|
||||
|
||||
# 2. 删除 BOM 覆盖(如果添加了)
|
||||
|
||||
# 3. 重新编译
|
||||
mvn clean package -DskipTests
|
||||
|
||||
# 4. 重启服务
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 五、风险评估
|
||||
|
||||
| 风险 | 概率 | 影响 | 缓解措施 |
|
||||
|---|---|---|---|
|
||||
| BOM 版本覆盖 | 中 | 高 | 显式锁定 Spring Boot 版本 |
|
||||
| 依赖冲突 | 低 | 中 | `mvn dependency:tree` 检查 |
|
||||
| API 变化 | 低 | 低 | 3.5.x 无 Breaking Changes |
|
||||
| 分页插件变化 | 低 | 中 | 测试分页查询 |
|
||||
|
||||
---
|
||||
|
||||
## 六、执行计划
|
||||
|
||||
```
|
||||
Step 1: 修改版本号 (2 分钟)
|
||||
Step 2: 添加 BOM 覆盖 (2 分钟)
|
||||
Step 3: mvn clean compile (2 分钟)
|
||||
Step 4: mvn clean package -DskipTests (2 分钟)
|
||||
Step 5: 重启后端 (1 分钟)
|
||||
Step 6: 功能验证 (30 分钟)
|
||||
Step 7: 提交代码 (1 分钟)
|
||||
```
|
||||
|
||||
**总工时**: 约 40 分钟
|
||||
|
||||
@@ -62,3 +62,24 @@
|
||||
- ✅ API 代理 HTTP 200
|
||||
- ✅ 1825 文件,107M
|
||||
|
||||
|
||||
---
|
||||
|
||||
## 后端组件升级进度
|
||||
|
||||
### Phase 1: 安全修复
|
||||
- [x] 1.1 BouncyCastle 1.69 → 1.80 (jdk15on → jdk18on) ✅ 2026-06-04
|
||||
|
||||
### Phase 2: 连接池 & 工具库
|
||||
- [x] 2.1 Druid 1.2.27 → 1.2.28 ✅ 2026-06-04
|
||||
- [x] 2.2 Fastjson2 2.0.58 → 2.0.61 ✅ 2026-06-04
|
||||
- [x] 2.3 Hutool 5.3.8 → 5.8.35 ✅ 2026-06-04
|
||||
|
||||
### Phase 3: 监控 & IO
|
||||
- [x] 3.1 OSHI 6.6.5 → 6.10.0 ✅ 2026-06-04
|
||||
- [x] 3.2 Commons IO 2.13.0 → 2.21.0 ✅ 2026-06-04
|
||||
- [x] 3.3 PostgreSQL 42.2.27 → 42.7.4 ✅ 2026-06-04
|
||||
|
||||
### Phase 5: PDF
|
||||
- [x] 5.1 itextpdf 5.5.12 → 5.5.13.4 ✅ 2026-06-04
|
||||
|
||||
|
||||
@@ -45,8 +45,8 @@
|
||||
|
||||
<!-- Mysql驱动包 -->
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<groupId>com.mysql</groupId>
|
||||
<artifactId>mysql-connector-j</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 核心模块-->
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>com.openhis</groupId>
|
||||
<artifactId>openhis-server</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>com.core</groupId>
|
||||
<artifactId>core-framework</artifactId>
|
||||
@@ -77,12 +78,13 @@
|
||||
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- JSQLParser - 用于MyBatis Plus -->
|
||||
<!-- MyBatis-Plus JSQLParser 插件 (3.5.9+ 拆分) -->
|
||||
<dependency>
|
||||
<groupId>com.github.jsqlparser</groupId>
|
||||
<artifactId>jsqlparser</artifactId>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-jsqlparser</artifactId>
|
||||
<version>${mybatis-plus.version}</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
</project>
|
||||
|
||||
@@ -29,22 +29,24 @@ public class PermitAllUrlProperties implements InitializingBean, ApplicationCont
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() {
|
||||
RequestMappingHandlerMapping mapping = applicationContext.getBean(RequestMappingHandlerMapping.class);
|
||||
RequestMappingHandlerMapping mapping = applicationContext.getBean("requestMappingHandlerMapping", RequestMappingHandlerMapping.class);
|
||||
Map<RequestMappingInfo, HandlerMethod> map = mapping.getHandlerMethods();
|
||||
|
||||
map.keySet().forEach(info -> {
|
||||
// Spring Boot 2.7+ 部分 RequestMappingInfo 的 patternsCondition 可能为 null
|
||||
if (info.getPatternsCondition() == null) return;
|
||||
HandlerMethod handlerMethod = map.get(info);
|
||||
|
||||
// 获取方法上边的注解 替代path variable 为 *
|
||||
Anonymous method = AnnotationUtils.findAnnotation(handlerMethod.getMethod(), Anonymous.class);
|
||||
Optional.ofNullable(method)
|
||||
.ifPresent(anonymous -> Objects.requireNonNull(info.getPatternsCondition().getPatterns())
|
||||
.ifPresent(anonymous -> info.getPatternsCondition().getPatterns()
|
||||
.forEach(url -> urls.add(RegExUtils.replaceAll(url, PATTERN, ASTERISK))));
|
||||
|
||||
// 获取类上边的注解, 替代path variable 为 *
|
||||
Anonymous controller = AnnotationUtils.findAnnotation(handlerMethod.getBeanType(), Anonymous.class);
|
||||
Optional.ofNullable(controller)
|
||||
.ifPresent(anonymous -> Objects.requireNonNull(info.getPatternsCondition().getPatterns())
|
||||
.ifPresent(anonymous -> info.getPatternsCondition().getPatterns()
|
||||
.forEach(url -> urls.add(RegExUtils.replaceAll(url, PATTERN, ASTERISK))));
|
||||
});
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ public class FrequencyController {
|
||||
frequency.setDayTimes(dayTimesStr); // 将转换后的字符串设置到 Frequency 对象
|
||||
}
|
||||
|
||||
return R.ok(frequencyService.saveOrUpdate(frequency, new LambdaQueryWrapper<Frequency>().eq(Frequency::getRateCode, frequency.getRateCode())),MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"保存频次详情"}));
|
||||
return R.ok(frequencyService.saveOrUpdate(frequency),MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"保存频次详情"}));
|
||||
}
|
||||
|
||||
@DeleteMapping("{id}")
|
||||
|
||||
@@ -53,6 +53,9 @@ user:
|
||||
|
||||
# Spring配置
|
||||
spring:
|
||||
mvc:
|
||||
pathmatch:
|
||||
matching-strategy: ant-path-matcher
|
||||
main:
|
||||
allow-circular-references: true
|
||||
# 资源信息
|
||||
@@ -108,6 +111,11 @@ pagehelper:
|
||||
auto-runtime-dialect: true
|
||||
|
||||
# Swagger配置
|
||||
# 禁用 Springfox (与 Spring Boot 2.7 不兼容, 后续迁移至 springdoc)
|
||||
springfox:
|
||||
documentation:
|
||||
enabled: false
|
||||
|
||||
swagger:
|
||||
# 是否开启swagger
|
||||
enabled: true
|
||||
|
||||
@@ -586,7 +586,7 @@ public class RedisUtil {
|
||||
try {
|
||||
return redisTemplate.execute((RedisCallback<Set<String>>) connection -> {
|
||||
Set<String> binaryKeys = new HashSet<>();
|
||||
Cursor<byte[]> cursor = connection.scan(new ScanOptions.ScanOptionsBuilder().match(realKey).count(Integer.MAX_VALUE).build());
|
||||
Cursor<byte[]> cursor = connection.scan(ScanOptions.scanOptions().match(realKey).count(Integer.MAX_VALUE).build());
|
||||
while (cursor.hasNext()) {
|
||||
binaryKeys.add(new String(cursor.next()));
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ public class BarCode extends HisBaseEntity {
|
||||
/**
|
||||
* 采样时间
|
||||
*/
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
@TableField(updateStrategy = FieldStrategy.NEVER)
|
||||
private Date collectTime;
|
||||
/**
|
||||
* 采样人
|
||||
@@ -52,16 +52,16 @@ public class BarCode extends HisBaseEntity {
|
||||
/**
|
||||
* 送检时间
|
||||
*/
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
@TableField(updateStrategy = FieldStrategy.NEVER)
|
||||
private Date sendTime;
|
||||
/**
|
||||
* 签收时间
|
||||
*/
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
@TableField(updateStrategy = FieldStrategy.NEVER)
|
||||
private Date receiveTime;
|
||||
/**
|
||||
* 退检时间
|
||||
*/
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
@TableField(updateStrategy = FieldStrategy.NEVER)
|
||||
private Date backFlag;
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ public class InspectionLabApply extends HisBaseEntity {
|
||||
/**
|
||||
* 申请时间
|
||||
*/
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
@TableField(updateStrategy = FieldStrategy.NEVER)
|
||||
private Date applyTime;
|
||||
/**
|
||||
* 临床诊断
|
||||
|
||||
@@ -41,7 +41,7 @@ public class Specimen extends HisBaseEntity {
|
||||
/** 样本定义ID,对应 adm_specimen_definition 表的 id */
|
||||
private Long specimenDefinitionId;
|
||||
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
@TableField(updateStrategy = FieldStrategy.NEVER)
|
||||
/* 样本的采集日期和时间 */
|
||||
private Date collectionDate;
|
||||
|
||||
@@ -53,7 +53,7 @@ public class Specimen extends HisBaseEntity {
|
||||
private String specimenUnit; //样本单位
|
||||
|
||||
/** 样本接收日期 */
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
@TableField(updateStrategy = FieldStrategy.NEVER)
|
||||
private Date receivedDate;
|
||||
|
||||
/** 采集状态,默认为待采集 */
|
||||
|
||||
@@ -48,11 +48,11 @@ public class OpSchedule extends HisBaseEntity {
|
||||
private String operName;
|
||||
|
||||
/** 术前诊断 */
|
||||
@TableField(value = "preoperative_diagnosis", insertStrategy = FieldStrategy.IGNORED)
|
||||
@TableField(value = "preoperative_diagnosis", insertStrategy = FieldStrategy.NEVER)
|
||||
private String preoperativeDiagnosis;
|
||||
|
||||
/** 术后诊断 */
|
||||
@TableField(value = "postoperative_diagnosis", insertStrategy = FieldStrategy.IGNORED)
|
||||
@TableField(value = "postoperative_diagnosis", insertStrategy = FieldStrategy.NEVER)
|
||||
private String postoperativeDiagnosis;
|
||||
|
||||
/** 手术安排日期时间 */
|
||||
@@ -95,43 +95,43 @@ public class OpSchedule extends HisBaseEntity {
|
||||
private String tableNo;
|
||||
|
||||
/** 麻醉方式 */
|
||||
@TableField(value = "anes_method", insertStrategy = FieldStrategy.IGNORED)
|
||||
@TableField(value = "anes_method", insertStrategy = FieldStrategy.NEVER)
|
||||
private String anesMethod;
|
||||
|
||||
/** 麻醉医生1编码 */
|
||||
@TableField(value = "anes_doctor1_code", insertStrategy = FieldStrategy.IGNORED)
|
||||
@TableField(value = "anes_doctor1_code", insertStrategy = FieldStrategy.NEVER)
|
||||
private String anesDoctor1Code;
|
||||
|
||||
/** 麻醉医生2编码 */
|
||||
@TableField(value = "anes_doctor2_code", insertStrategy = FieldStrategy.IGNORED)
|
||||
@TableField(value = "anes_doctor2_code", insertStrategy = FieldStrategy.NEVER)
|
||||
private String anesDoctor2Code;
|
||||
|
||||
/** 麻醉医生3编码 */
|
||||
@TableField(value = "anes_doctor3_code", insertStrategy = FieldStrategy.IGNORED)
|
||||
@TableField(value = "anes_doctor3_code", insertStrategy = FieldStrategy.NEVER)
|
||||
private String anesDoctor3Code;
|
||||
|
||||
/** 洗手护士编码 */
|
||||
@TableField(value = "scrub_nurse_code", insertStrategy = FieldStrategy.IGNORED)
|
||||
@TableField(value = "scrub_nurse_code", insertStrategy = FieldStrategy.NEVER)
|
||||
private String scrubNurseCode;
|
||||
|
||||
/** 巡回护士1编码 */
|
||||
@TableField(value = "circu_nurse1_code", insertStrategy = FieldStrategy.IGNORED)
|
||||
@TableField(value = "circu_nurse1_code", insertStrategy = FieldStrategy.NEVER)
|
||||
private String circuNurse1Code;
|
||||
|
||||
/** 巡回护士2编码 */
|
||||
@TableField(value = "circu_nurse2_code", insertStrategy = FieldStrategy.IGNORED)
|
||||
@TableField(value = "circu_nurse2_code", insertStrategy = FieldStrategy.NEVER)
|
||||
private String circuNurse2Code;
|
||||
|
||||
/** 器械护士1编码 */
|
||||
@TableField(value = "scrub_nurse1_code", insertStrategy = FieldStrategy.IGNORED)
|
||||
@TableField(value = "scrub_nurse1_code", insertStrategy = FieldStrategy.NEVER)
|
||||
private String scrubNurse1Code;
|
||||
|
||||
/** 器械护士2编码 */
|
||||
@TableField(value = "scrub_nurse2_code", insertStrategy = FieldStrategy.IGNORED)
|
||||
@TableField(value = "scrub_nurse2_code", insertStrategy = FieldStrategy.NEVER)
|
||||
private String scrubNurse2Code;
|
||||
|
||||
/** 主刀医生编码 */
|
||||
@TableField(value = "surgeon_code", insertStrategy = FieldStrategy.IGNORED)
|
||||
@TableField(value = "surgeon_code", insertStrategy = FieldStrategy.NEVER)
|
||||
private String surgeonCode;
|
||||
|
||||
/** 助手1编码 */
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.5.15</version>
|
||||
<version>2.7.18</version>
|
||||
<relativePath />
|
||||
</parent>
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<bitwalker.version>1.21</bitwalker.version>
|
||||
<swagger.version>3.0.0</swagger.version>
|
||||
<kaptcha.version>2.3.3</kaptcha.version>
|
||||
<pagehelper.boot.version>1.4.7</pagehelper.boot.version>
|
||||
<pagehelper.boot.version>2.1.1</pagehelper.boot.version>
|
||||
<oshi.version>6.10.0</oshi.version>
|
||||
<commons.io.version>2.21.0</commons.io.version>
|
||||
<poi.version>4.1.2</poi.version>
|
||||
@@ -40,7 +40,7 @@
|
||||
<tomcat.version>9.0.96</tomcat.version>
|
||||
<logback.version>1.2.13</logback.version>
|
||||
<lombok.version>1.18.34</lombok.version> <!-- 替换为 -->
|
||||
<mybatis-plus.version>3.5.5</mybatis-plus.version>
|
||||
<mybatis-plus.version>3.5.16</mybatis-plus.version>
|
||||
<flowable.version>6.8.0</flowable.version>
|
||||
<postgresql.version>42.7.4</postgresql.version>
|
||||
<aviator.version>5.3.3</aviator.version>
|
||||
@@ -56,7 +56,7 @@
|
||||
<itext-asian.version>5.2.0</itext-asian.version>
|
||||
<mysql-connector-j.version>9.4.0</mysql-connector-j.version>
|
||||
<jsr250.version>1.3.2</jsr250.version>
|
||||
<jsqlparser.version>4.5</jsqlparser.version>
|
||||
<jsqlparser.version>5.2</jsqlparser.version>
|
||||
</properties>
|
||||
|
||||
<!-- 依赖声明 -->
|
||||
|
||||
Reference in New Issue
Block a user