Commit 644188385562e2e36996fe2480142ea8efc39052
1 parent
1e2bcf9a
【升级】spring-boot from 2.4.12 to 2.5.9,最新的 Spring Boot 2.6.X 在等更流行一些,稳定第一
Showing
24 changed files
with
72 additions
and
56 deletions
README.md
| ... | ... | @@ -87,6 +87,11 @@ ps:核心功能已经实现,正在对接微信小程序中... |
| 87 | 87 | * 2022 Q2 => 完成对 <https://github.com/YunaiV/onemall> 的迁移,作为 onemall 的 Spring Boot 单体版本。 |
| 88 | 88 | * 2022 Q4 => 完成对 <https://github.com/YunaiV/onemall>> 的重构,作为 onemall 的 Spring Cloud 微服务版本。 |
| 89 | 89 | |
| 90 | +### 会员中心 | |
| 91 | + | |
| 92 | +正在开发中,大体计划如下: | |
| 93 | +* 2021 Q1 =》完成对 <https://github.com/YunaiV/onemall> 的迁移 | |
| 94 | + | |
| 90 | 95 | ### 基础设施 |
| 91 | 96 | |
| 92 | 97 | | | 功能 | 描述 | |
| ... | ... | @@ -118,43 +123,45 @@ ps:核心功能已经实现,正在对接微信小程序中... |
| 118 | 123 | |
| 119 | 124 | ## 技术栈 |
| 120 | 125 | |
| 121 | -| 项目 | 说明 | | |
| 122 | -| --- | --- | | |
| 123 | -| `yudao-dependencies` | Maven 依赖版本管理 | | |
| 124 | -| `yudao-framework` | Java 框架拓展 | | |
| 125 | -| `yudao-admin-server` | 管理后台的服务端 | | |
| 126 | -| `yudao-admin-ui` | 管理后台的 UI 界面 | | |
| 127 | -| `yudao-user-server` | 用户前台的服务端 | | |
| 128 | -| `yudao-user-ui` | 用户前台的 UI 界面 | | |
| 129 | -| `yudao-core-service` | 公共服务,提供共享逻辑 | | |
| 130 | - | |
| 131 | -> 友情提示:`yudao-admin-server` 和 `yudao-user-server` 会存在需要复用的逻辑,通过 `yudao-core-service` 实现。 | |
| 126 | +| 项目 | 说明 | | |
| 127 | +|-----------------------|--------------------| | |
| 128 | +| `yudao-dependencies` | Maven 依赖版本管理 | | |
| 129 | +| `yudao-framework` | Java 框架拓展 | | |
| 130 | +| `yudao-server` | 管理后台 + 用户 APP 的服务端 | | |
| 131 | +| `yudao-admin-ui` | 管理后台的 UI 界面 | | |
| 132 | +| `yudao-user-ui` | 用户 APP 的 UI 界面 | | |
| 133 | +| `yudao-module-system` | 系统功能的 Module 模块 | | |
| 134 | +| `yudao-module-member` | 会员中心的 Module 模块 | | |
| 135 | +| `yudao-module-infra` | 基础设施的 Module 模块 | | |
| 136 | +| `yudao-module-tool` | 研发工具的 Module 模块 | | |
| 137 | +| `yudao-module-bpm` | 工作流程的 Module 模块 | | |
| 138 | +| `yudao-module-pay` | 支付系统的 Module 模块 | | |
| 132 | 139 | |
| 133 | 140 | ### 后端 |
| 134 | 141 | |
| 135 | -| 框架 | 说明 | 版本 | 学习指南 | | |
| 136 | -| --- | --- | --- | --- | | |
| 137 | -| [Spring Boot](https://spring.io/projects/spring-boot) | 应用开发框架 | 2.4.12 | [文档](https://github.com/YunaiV/SpringBoot-Labs) | | |
| 138 | -| [MySQL](https://www.mysql.com/cn/) | 数据库服务器 | 5.7 | | | |
| 139 | -| [Druid](https://github.com/alibaba/druid) | JDBC 连接池、监控组件 | 1.2.8 | [文档](http://www.iocoder.cn/Spring-Boot/datasource-pool/?yudao) | | |
| 140 | -| [MyBatis Plus](https://mp.baomidou.com/) | MyBatis 增强工具包 | 3.4.3.4 | [文档](http://www.iocoder.cn/Spring-Boot/MyBatis/?yudao) | | |
| 141 | -| [Dynamic Datasource](https://dynamic-datasource.com/) | 动态数据源 | 3.5.0 | [文档](http://www.iocoder.cn/Spring-Boot/datasource-pool/?yudao) | | |
| 142 | -| [Redis](https://redis.io/) | key-value 数据库 | 5.0 | | | |
| 143 | -| [Redisson](https://github.com/redisson/redisson) | Redis 客户端 | 3.16.6 | [文档](http://www.iocoder.cn/Spring-Boot/Redis/?yudao) | | |
| 144 | -| [Spring MVC](https://github.com/spring-projects/spring-framework/tree/master/spring-webmvc) | MVC 框架 | 5.3.13 | [文档](http://www.iocoder.cn/SpringMVC/MVC/?yudao) | | |
| 145 | -| [Spring Security](https://github.com/spring-projects/spring-security) | Spring 安全框架 | 5.4.9 | [文档](http://www.iocoder.cn/Spring-Boot/Spring-Security/?yudao) | | |
| 146 | -| [Hibernate Validator](https://github.com/hibernate/hibernate-validator) | 参数校验组件 | 6.1.7 | [文档](http://www.iocoder.cn/Spring-Boot/Validation/?yudao) | | |
| 142 | +| 框架 | 说明 | 版本 | 学习指南 | | |
| 143 | +| --- | --- |----------| --- | | |
| 144 | +| [Spring Boot](https://spring.io/projects/spring-boot) | 应用开发框架 | 2.5.9 | [文档](https://github.com/YunaiV/SpringBoot-Labs) | | |
| 145 | +| [MySQL](https://www.mysql.com/cn/) | 数据库服务器 | 5.7 | | | |
| 146 | +| [Druid](https://github.com/alibaba/druid) | JDBC 连接池、监控组件 | 1.2.8 | [文档](http://www.iocoder.cn/Spring-Boot/datasource-pool/?yudao) | | |
| 147 | +| [MyBatis Plus](https://mp.baomidou.com/) | MyBatis 增强工具包 | 3.4.3.4 | [文档](http://www.iocoder.cn/Spring-Boot/MyBatis/?yudao) | | |
| 148 | +| [Dynamic Datasource](https://dynamic-datasource.com/) | 动态数据源 | 3.5.0 | [文档](http://www.iocoder.cn/Spring-Boot/datasource-pool/?yudao) | | |
| 149 | +| [Redis](https://redis.io/) | key-value 数据库 | 5.0 | | | |
| 150 | +| [Redisson](https://github.com/redisson/redisson) | Redis 客户端 | 3.16.6 | [文档](http://www.iocoder.cn/Spring-Boot/Redis/?yudao) | | |
| 151 | +| [Spring MVC](https://github.com/spring-projects/spring-framework/tree/master/spring-webmvc) | MVC 框架 | 5.3.15 | [文档](http://www.iocoder.cn/SpringMVC/MVC/?yudao) | | |
| 152 | +| [Spring Security](https://github.com/spring-projects/spring-security) | Spring 安全框架 | 5.5.4 | [文档](http://www.iocoder.cn/Spring-Boot/Spring-Security/?yudao) | | |
| 153 | +| [Hibernate Validator](https://github.com/hibernate/hibernate-validator) | 参数校验组件 | 6.2.0 | [文档](http://www.iocoder.cn/Spring-Boot/Validation/?yudao) | | |
| 147 | 154 | | [Activiti](https://github.com/Activiti/Activiti) | 工作流引擎 | 7.1.0.M6 | [文档](TODO) | |
| 148 | -| [Quartz](https://github.com/quartz-scheduler) | 任务调度组件 | 2.3.2 | [文档](http://www.iocoder.cn/Spring-Boot/Job/?yudao) | | |
| 149 | -| [Knife4j](https://gitee.com/xiaoym/knife4j) | Swagger 增强 UI 实现 | 3.0.2 | [文档](http://www.iocoder.cn/Spring-Boot/Swagger/?yudao) | | |
| 150 | -| [Resilience4j](https://github.com/resilience4j/resilience4j) | 服务保障组件 | 1.7.0 | [文档](http://www.iocoder.cn/Spring-Boot/Resilience4j/?yudao) | | |
| 151 | -| [SkyWalking](https://skywalking.apache.org/) | 分布式应用追踪系统 | 8.5.0 | [文档](http://www.iocoder.cn/Spring-Boot/SkyWalking/?yudao) | | |
| 152 | -| [Spring Boot Admin](https://github.com/codecentric/spring-boot-admin) | Spring Boot 监控平台 | 2.4.2 | [文档](http://www.iocoder.cn/Spring-Boot/Admin/?yudao) | | |
| 153 | -| [Jackson](https://github.com/FasterXML/jackson) | JSON 工具库 | 2.11.4 | | | |
| 154 | -| [MapStruct](https://mapstruct.org/) | Java Bean 转换 | 1.4.1 | [文档](http://www.iocoder.cn/Spring-Boot/MapStruct/?yudao) | | |
| 155 | -| [Lombok](https://projectlombok.org/) | 消除冗长的 Java 代码 | 1.16.14 | [文档](http://www.iocoder.cn/Spring-Boot/Lombok/?yudao) | | |
| 156 | -| [JUnit](https://junit.org/junit5/) | Java 单元测试框架 | 5.7.1 | - | | |
| 157 | -| [Mockito](https://github.com/mockito/mockito) | Java Mock 框架 | 3.6.28 | - | | |
| 155 | +| [Quartz](https://github.com/quartz-scheduler) | 任务调度组件 | 2.3.2 | [文档](http://www.iocoder.cn/Spring-Boot/Job/?yudao) | | |
| 156 | +| [Knife4j](https://gitee.com/xiaoym/knife4j) | Swagger 增强 UI 实现 | 3.0.2 | [文档](http://www.iocoder.cn/Spring-Boot/Swagger/?yudao) | | |
| 157 | +| [Resilience4j](https://github.com/resilience4j/resilience4j) | 服务保障组件 | 1.7.0 | [文档](http://www.iocoder.cn/Spring-Boot/Resilience4j/?yudao) | | |
| 158 | +| [SkyWalking](https://skywalking.apache.org/) | 分布式应用追踪系统 | 8.5.0 | [文档](http://www.iocoder.cn/Spring-Boot/SkyWalking/?yudao) | | |
| 159 | +| [Spring Boot Admin](https://github.com/codecentric/spring-boot-admin) | Spring Boot 监控平台 | 2.4.2 | [文档](http://www.iocoder.cn/Spring-Boot/Admin/?yudao) | | |
| 160 | +| [Jackson](https://github.com/FasterXML/jackson) | JSON 工具库 | 2.12.6 | | | |
| 161 | +| [MapStruct](https://mapstruct.org/) | Java Bean 转换 | 1.4.1 | [文档](http://www.iocoder.cn/Spring-Boot/MapStruct/?yudao) | | |
| 162 | +| [Lombok](https://projectlombok.org/) | 消除冗长的 Java 代码 | 1.16.14 | [文档](http://www.iocoder.cn/Spring-Boot/Lombok/?yudao) | | |
| 163 | +| [JUnit](https://junit.org/junit5/) | Java 单元测试框架 | 5.7.2 | - | | |
| 164 | +| [Mockito](https://github.com/mockito/mockito) | Java Mock 框架 | 3.9.0 | - | | |
| 158 | 165 | |
| 159 | 166 | ### 前端 |
| 160 | 167 | ... | ... |
yudao-dependencies/pom.xml
| ... | ... | @@ -16,7 +16,7 @@ |
| 16 | 16 | <properties> |
| 17 | 17 | <revision>1.4.0-snapshot</revision> |
| 18 | 18 | <!-- 统一依赖管理 --> |
| 19 | - <spring.boot.version>2.4.12</spring.boot.version> | |
| 19 | + <spring.boot.version>2.5.9</spring.boot.version> | |
| 20 | 20 | <!-- Web 相关 --> |
| 21 | 21 | <knife4j.version>3.0.2</knife4j.version> |
| 22 | 22 | <swagger-annotations.version>1.5.22</swagger-annotations.version> |
| ... | ... | @@ -40,7 +40,7 @@ |
| 40 | 40 | <!-- Test 测试相关 --> |
| 41 | 41 | <podam.version>7.2.6.RELEASE</podam.version> |
| 42 | 42 | <jedis-mock.version>0.1.16</jedis-mock.version> |
| 43 | - <mockito-inline.version>3.6.28</mockito-inline.version> | |
| 43 | + <mockito-inline.version>3.9.0</mockito-inline.version> | |
| 44 | 44 | <!-- Bpm 工作流相关 --> |
| 45 | 45 | <activiti.version>7.1.0.M6</activiti.version> |
| 46 | 46 | <flowable.version>6.7.0</flowable.version> | ... | ... |
yudao-module-bpm/yudao-module-bpm-base/src/test/java/cn/iocoder/yudao/module/bpm/service/definition/BpmFormServiceTest.java
| 1 | 1 | package cn.iocoder.yudao.module.bpm.service.definition; |
| 2 | 2 | |
| 3 | 3 | import cn.hutool.core.util.RandomUtil; |
| 4 | -import cn.iocoder.yudao.server.BaseDbUnitTest; | |
| 4 | +import cn.iocoder.yudao.module.bpm.test.BaseDbUnitTest; | |
| 5 | 5 | import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form.BpmFormCreateReqVO; |
| 6 | 6 | import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form.BpmFormPageReqVO; |
| 7 | 7 | import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form.BpmFormUpdateReqVO; | ... | ... |
yudao-module-bpm/yudao-module-bpm-base/src/test/java/cn/iocoder/yudao/module/bpm/service/definition/BpmUserGroupServiceTest.java
| 1 | 1 | package cn.iocoder.yudao.module.bpm.service.definition; |
| 2 | 2 | |
| 3 | -import cn.iocoder.yudao.server.BaseDbUnitTest; | |
| 3 | +import cn.iocoder.yudao.module.bpm.test.BaseDbUnitTest; | |
| 4 | 4 | import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group.BpmUserGroupCreateReqVO; |
| 5 | 5 | import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group.BpmUserGroupPageReqVO; |
| 6 | 6 | import cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group.BpmUserGroupUpdateReqVO; | ... | ... |
yudao-module-bpm/yudao-module-bpm-base/src/test/java/cn/iocoder/yudao/server/BaseDbUnitTest.java renamed to yudao-module-bpm/yudao-module-bpm-base/src/test/java/cn/iocoder/yudao/module/bpm/test/BaseDbUnitTest.java
| 1 | -package cn.iocoder.yudao.server; | |
| 1 | +package cn.iocoder.yudao.module.bpm.test; | |
| 2 | 2 | |
| 3 | 3 | import cn.iocoder.yudao.framework.datasource.config.YudaoDataSourceAutoConfiguration; |
| 4 | 4 | import cn.iocoder.yudao.framework.mybatis.config.YudaoMybatisAutoConfiguration; |
| ... | ... | @@ -6,6 +6,7 @@ import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure; |
| 6 | 6 | import com.baomidou.mybatisplus.autoconfigure.MybatisPlusAutoConfiguration; |
| 7 | 7 | import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; |
| 8 | 8 | import org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration; |
| 9 | +import org.springframework.boot.autoconfigure.sql.init.SqlInitializationAutoConfiguration; | |
| 9 | 10 | import org.springframework.boot.test.context.SpringBootTest; |
| 10 | 11 | import org.springframework.context.annotation.Import; |
| 11 | 12 | import org.springframework.test.context.ActiveProfiles; |
| ... | ... | @@ -20,6 +21,7 @@ import org.springframework.test.context.jdbc.Sql; |
| 20 | 21 | */ |
| 21 | 22 | @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE, classes = BaseDbUnitTest.Application.class) |
| 22 | 23 | @ActiveProfiles("unit-test") // 设置使用 application-unit-test 配置文件 |
| 24 | +@Sql(scripts = "/sql/create_tables.sql", executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD) // 每个单元测试结束前,创建表 | |
| 23 | 25 | @Sql(scripts = "/sql/clean.sql", executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD) // 每个单元测试结束后,清理 DB |
| 24 | 26 | public class BaseDbUnitTest { |
| 25 | 27 | |
| ... | ... | @@ -29,6 +31,7 @@ public class BaseDbUnitTest { |
| 29 | 31 | DataSourceAutoConfiguration.class, // Spring DB 自动配置类 |
| 30 | 32 | DataSourceTransactionManagerAutoConfiguration.class, // Spring 事务自动配置类 |
| 31 | 33 | DruidDataSourceAutoConfigure.class, // Druid 自动配置类 |
| 34 | + SqlInitializationAutoConfiguration.class, | |
| 32 | 35 | // MyBatis 配置类 |
| 33 | 36 | YudaoMybatisAutoConfiguration.class, // 自己的 MyBatis 配置类 |
| 34 | 37 | MybatisPlusAutoConfiguration.class, // MyBatis 的自动配置类 | ... | ... |
yudao-module-bpm/yudao-module-bpm-base/src/test/resources/application-unit-test.yaml
| ... | ... | @@ -13,7 +13,6 @@ spring: |
| 13 | 13 | driver-class-name: org.h2.Driver |
| 14 | 14 | username: sa |
| 15 | 15 | password: |
| 16 | - schema: classpath:sql/create_tables.sql # MySQL 转 H2 的语句,使用 https://www.jooq.org/translate/ 工具 | |
| 17 | 16 | druid: |
| 18 | 17 | async-init: true # 单元测试,异步初始化 Druid 连接池,提升启动速度 |
| 19 | 18 | initial-size: 1 # 单元测试,配置为 1,提升启动速度 | ... | ... |
yudao-module-bpm/yudao-module-bpm-impl-activiti/src/test/java/cn/iocoder/yudao/module/bpm/test/BaseDbUnitTest.java
| ... | ... | @@ -20,6 +20,7 @@ import org.springframework.test.context.jdbc.Sql; |
| 20 | 20 | */ |
| 21 | 21 | @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE, classes = BaseDbUnitTest.Application.class) |
| 22 | 22 | @ActiveProfiles("unit-test") // 设置使用 application-unit-test 配置文件 |
| 23 | +@Sql(scripts = "/sql/create_tables.sql", executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD) // 每个单元测试结束前,创建表 | |
| 23 | 24 | @Sql(scripts = "/sql/clean.sql", executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD) // 每个单元测试结束后,清理 DB |
| 24 | 25 | public class BaseDbUnitTest { |
| 25 | 26 | ... | ... |
yudao-module-bpm/yudao-module-bpm-impl-activiti/src/test/resources/application-unit-test.yaml
| ... | ... | @@ -13,7 +13,6 @@ spring: |
| 13 | 13 | driver-class-name: org.h2.Driver |
| 14 | 14 | username: sa |
| 15 | 15 | password: |
| 16 | - schema: classpath:sql/create_tables.sql # MySQL 转 H2 的语句,使用 https://www.jooq.org/translate/ 工具 | |
| 17 | 16 | druid: |
| 18 | 17 | async-init: true # 单元测试,异步初始化 Druid 连接池,提升启动速度 |
| 19 | 18 | initial-size: 1 # 单元测试,配置为 1,提升启动速度 | ... | ... |
yudao-module-infra/yudao-module-infra-impl/src/test/java/cn/iocoder/yudao/module/infra/test/BaseDbAndRedisUnitTest.java
| ... | ... | @@ -23,6 +23,7 @@ import org.springframework.test.context.jdbc.Sql; |
| 23 | 23 | */ |
| 24 | 24 | @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE, classes = BaseDbAndRedisUnitTest.Application.class) |
| 25 | 25 | @ActiveProfiles("unit-test") // 设置使用 application-unit-test 配置文件 |
| 26 | +@Sql(scripts = "/sql/create_tables.sql", executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD) // 每个单元测试结束前,创建表 | |
| 26 | 27 | @Sql(scripts = "/sql/clean.sql", executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD) // 每个单元测试结束后,清理 DB |
| 27 | 28 | public class BaseDbAndRedisUnitTest { |
| 28 | 29 | ... | ... |
yudao-module-infra/yudao-module-infra-impl/src/test/java/cn/iocoder/yudao/module/infra/test/BaseDbUnitTest.java
| ... | ... | @@ -20,6 +20,7 @@ import org.springframework.test.context.jdbc.Sql; |
| 20 | 20 | */ |
| 21 | 21 | @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE, classes = BaseDbUnitTest.Application.class) |
| 22 | 22 | @ActiveProfiles("unit-test") // 设置使用 application-unit-test 配置文件 |
| 23 | +@Sql(scripts = "/sql/create_tables.sql", executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD) // 每个单元测试结束前,创建表 | |
| 23 | 24 | @Sql(scripts = "/sql/clean.sql", executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD) // 每个单元测试结束后,清理 DB |
| 24 | 25 | public class BaseDbUnitTest { |
| 25 | 26 | ... | ... |
yudao-module-infra/yudao-module-infra-impl/src/test/resources/application-unit-test.yaml
| ... | ... | @@ -13,7 +13,6 @@ spring: |
| 13 | 13 | driver-class-name: org.h2.Driver |
| 14 | 14 | username: sa |
| 15 | 15 | password: |
| 16 | - schema: classpath:sql/create_tables.sql # MySQL 转 H2 的语句,使用 https://www.jooq.org/translate/ 工具 | |
| 17 | 16 | druid: |
| 18 | 17 | async-init: true # 单元测试,异步初始化 Druid 连接池,提升启动速度 |
| 19 | 18 | initial-size: 1 # 单元测试,配置为 1,提升启动速度 | ... | ... |
yudao-module-member/yudao-module-member-impl/src/test/java/cn/iocoder/yudao/module/member/test/BaseDbAndRedisUnitTest.java
| ... | ... | @@ -23,6 +23,7 @@ import org.springframework.test.context.jdbc.Sql; |
| 23 | 23 | */ |
| 24 | 24 | @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE, classes = BaseDbAndRedisUnitTest.Application.class) |
| 25 | 25 | @ActiveProfiles("unit-test") // 设置使用 application-unit-test 配置文件 |
| 26 | +@Sql(scripts = "/sql/create_tables.sql", executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD) // 每个单元测试结束前,创建表 | |
| 26 | 27 | @Sql(scripts = "/sql/clean.sql", executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD) // 每个单元测试结束后,清理 DB |
| 27 | 28 | public class BaseDbAndRedisUnitTest { |
| 28 | 29 | ... | ... |
yudao-module-member/yudao-module-member-impl/src/test/java/cn/iocoder/yudao/module/member/test/BaseDbUnitTest.java
| ... | ... | @@ -20,6 +20,7 @@ import org.springframework.test.context.jdbc.Sql; |
| 20 | 20 | */ |
| 21 | 21 | @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE, classes = BaseDbUnitTest.Application.class) |
| 22 | 22 | @ActiveProfiles("unit-test") // 设置使用 application-unit-test 配置文件 |
| 23 | +@Sql(scripts = "/sql/create_tables.sql", executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD) // 每个单元测试结束前,创建表 | |
| 23 | 24 | @Sql(scripts = "/sql/clean.sql", executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD) // 每个单元测试结束后,清理 DB |
| 24 | 25 | public class BaseDbUnitTest { |
| 25 | 26 | ... | ... |
yudao-module-member/yudao-module-member-impl/src/test/resources/application-unit-test.yaml
| ... | ... | @@ -13,7 +13,6 @@ spring: |
| 13 | 13 | driver-class-name: org.h2.Driver |
| 14 | 14 | username: sa |
| 15 | 15 | password: |
| 16 | - schema: classpath:sql/create_tables.sql # MySQL 转 H2 的语句,使用 https://www.jooq.org/translate/ 工具 | |
| 17 | 16 | druid: |
| 18 | 17 | async-init: true # 单元测试,异步初始化 Druid 连接池,提升启动速度 |
| 19 | 18 | initial-size: 1 # 单元测试,配置为 1,提升启动速度 | ... | ... |
yudao-module-pay/yudao-module-pay-impl/src/test/java/cn/iocoder/yudao/module/pay/test/BaseDbAndRedisUnitTest.java
| ... | ... | @@ -23,6 +23,7 @@ import org.springframework.test.context.jdbc.Sql; |
| 23 | 23 | */ |
| 24 | 24 | @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE, classes = BaseDbAndRedisUnitTest.Application.class) |
| 25 | 25 | @ActiveProfiles("unit-test") // 设置使用 application-unit-test 配置文件 |
| 26 | +@Sql(scripts = "/sql/create_tables.sql", executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD) // 每个单元测试结束前,创建表 | |
| 26 | 27 | @Sql(scripts = "/sql/clean.sql", executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD) // 每个单元测试结束后,清理 DB |
| 27 | 28 | public class BaseDbAndRedisUnitTest { |
| 28 | 29 | ... | ... |
yudao-module-pay/yudao-module-pay-impl/src/test/java/cn/iocoder/yudao/module/pay/test/BaseDbUnitTest.java
| ... | ... | @@ -20,6 +20,7 @@ import org.springframework.test.context.jdbc.Sql; |
| 20 | 20 | */ |
| 21 | 21 | @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE, classes = BaseDbUnitTest.Application.class) |
| 22 | 22 | @ActiveProfiles("unit-test") // 设置使用 application-unit-test 配置文件 |
| 23 | +@Sql(scripts = "/sql/create_tables.sql", executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD) // 每个单元测试结束前,创建表 | |
| 23 | 24 | @Sql(scripts = "/sql/clean.sql", executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD) // 每个单元测试结束后,清理 DB |
| 24 | 25 | public class BaseDbUnitTest { |
| 25 | 26 | ... | ... |
yudao-module-pay/yudao-module-pay-impl/src/test/resources/application-unit-test.yaml
| ... | ... | @@ -13,7 +13,6 @@ spring: |
| 13 | 13 | driver-class-name: org.h2.Driver |
| 14 | 14 | username: sa |
| 15 | 15 | password: |
| 16 | - schema: classpath:sql/create_tables.sql # MySQL 转 H2 的语句,使用 https://www.jooq.org/translate/ 工具 | |
| 17 | 16 | druid: |
| 18 | 17 | async-init: true # 单元测试,异步初始化 Druid 连接池,提升启动速度 |
| 19 | 18 | initial-size: 1 # 单元测试,配置为 1,提升启动速度 | ... | ... |
yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/test/BaseDbAndRedisUnitTest.java
| ... | ... | @@ -23,6 +23,7 @@ import org.springframework.test.context.jdbc.Sql; |
| 23 | 23 | */ |
| 24 | 24 | @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE, classes = BaseDbAndRedisUnitTest.Application.class) |
| 25 | 25 | @ActiveProfiles("unit-test") // 设置使用 application-unit-test 配置文件 |
| 26 | +@Sql(scripts = "/sql/create_tables.sql", executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD) // 每个单元测试结束前,创建表 | |
| 26 | 27 | @Sql(scripts = "/sql/clean.sql", executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD) // 每个单元测试结束后,清理 DB |
| 27 | 28 | public class BaseDbAndRedisUnitTest { |
| 28 | 29 | ... | ... |
yudao-module-system/yudao-module-system-impl/src/test/java/cn/iocoder/yudao/module/system/test/BaseDbUnitTest.java
| ... | ... | @@ -20,6 +20,7 @@ import org.springframework.test.context.jdbc.Sql; |
| 20 | 20 | */ |
| 21 | 21 | @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE, classes = BaseDbUnitTest.Application.class) |
| 22 | 22 | @ActiveProfiles("unit-test") // 设置使用 application-unit-test 配置文件 |
| 23 | +@Sql(scripts = "/sql/create_tables.sql", executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD) // 每个单元测试结束前,创建表 | |
| 23 | 24 | @Sql(scripts = "/sql/clean.sql", executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD) // 每个单元测试结束后,清理 DB |
| 24 | 25 | public class BaseDbUnitTest { |
| 25 | 26 | ... | ... |
yudao-module-system/yudao-module-system-impl/src/test/resources/application-unit-test.yaml
| ... | ... | @@ -13,7 +13,6 @@ spring: |
| 13 | 13 | driver-class-name: org.h2.Driver |
| 14 | 14 | username: sa |
| 15 | 15 | password: |
| 16 | - schema: classpath:sql/create_tables.sql # MySQL 转 H2 的语句,使用 https://www.jooq.org/translate/ 工具 | |
| 17 | 16 | druid: |
| 18 | 17 | async-init: true # 单元测试,异步初始化 Druid 连接池,提升启动速度 |
| 19 | 18 | initial-size: 1 # 单元测试,配置为 1,提升启动速度 | ... | ... |
yudao-module-tool/yudao-module-tool-impl/src/test/java/cn/iocoder/yudao/module/tool/test/BaseDbUnitTest.java
| ... | ... | @@ -20,6 +20,7 @@ import org.springframework.test.context.jdbc.Sql; |
| 20 | 20 | */ |
| 21 | 21 | @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE, classes = BaseDbUnitTest.Application.class) |
| 22 | 22 | @ActiveProfiles("unit-test") // 设置使用 application-unit-test 配置文件 |
| 23 | +@Sql(scripts = "/sql/create_tables.sql", executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD) // 每个单元测试结束前,创建表 | |
| 23 | 24 | @Sql(scripts = "/sql/clean.sql", executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD) // 每个单元测试结束后,清理 DB |
| 24 | 25 | public class BaseDbUnitTest { |
| 25 | 26 | ... | ... |
yudao-module-tool/yudao-module-tool-impl/src/test/resources/application-unit-test.yaml
| ... | ... | @@ -13,7 +13,6 @@ spring: |
| 13 | 13 | driver-class-name: org.h2.Driver |
| 14 | 14 | username: sa |
| 15 | 15 | password: |
| 16 | - schema: classpath:sql/create_tables.sql # MySQL 转 H2 的语句,使用 https://www.jooq.org/translate/ 工具 | |
| 17 | 16 | druid: |
| 18 | 17 | async-init: true # 单元测试,异步初始化 Druid 连接池,提升启动速度 |
| 19 | 18 | initial-size: 1 # 单元测试,配置为 1,提升启动速度 | ... | ... |
yudao-server/src/main/resources/application-local.yaml
| ... | ... | @@ -92,7 +92,8 @@ spring: |
| 92 | 92 | instanceId: AUTO # 自动生成 instance ID |
| 93 | 93 | # JobStore 相关配置 |
| 94 | 94 | jobStore: |
| 95 | - class: org.quartz.impl.jdbcjobstore.JobStoreTX # JobStore 实现类 | |
| 95 | + # JobStore 实现类。可见博客:https://blog.csdn.net/weixin_42458219/article/details/122247162 | |
| 96 | + class: org.springframework.scheduling.quartz.LocalDataSourceJobStore | |
| 96 | 97 | isClustered: true # 是集群模式 |
| 97 | 98 | clusterCheckinInterval: 15000 # 集群检查频率,单位:毫秒。默认为 15000,即 15 秒 |
| 98 | 99 | misfireThreshold: 60000 # misfire 阀值,单位:毫秒。 | ... | ... |
更新日志.md
| ... | ... | @@ -9,6 +9,7 @@ |
| 9 | 9 | * 支付 |
| 10 | 10 | * 用户前台的社交登陆 |
| 11 | 11 | * 用户前台的修改手机、修改密码、忘记密码 |
| 12 | +* 升级 mybatis plus 最新版本,优化多租户的实现 | |
| 12 | 13 | |
| 13 | 14 | *【优化】操作日志新增用户类型,实现 APP 端的 API 的操作日志的记录 |
| 14 | 15 | *【修复】管理后台 UI 超时登录后,返回登陆界面时,由于未登陆加载不到字典数据,导致报错的问题 |
| ... | ... | @@ -24,22 +25,23 @@ TODO 待统计 |
| 24 | 25 | |
| 25 | 26 | ### ⭐ New Features |
| 26 | 27 | |
| 27 | -*【重构】大模块按照多 Maven Module 的方式拆分,提升可维护性,为后续重构 onemall 提供基础 | |
| 28 | -*【新增】Spring Security 支持读取多种用户类型,从不同的数据库表,从而实现单项目提供管理后台、用户 APP 的不同 RESTful API 接口 | |
| 29 | -*【新增】Spring Security 新增 AuthorizeRequestsCustomizer 抽象类, 自定义每个 Maven Module 的 URL 的安全配置 | |
| 30 | -*【新增】代码生成器支持多 Maven Module 的方式生成代码,支持管理后台、用户 APP 两种场景的 RESTful API 的生成,支持 H2 SQL 脚本的生成 | |
| 31 | -*【重构】将数据库文档调整到 tool 模块,更加明确 | |
| 32 | -*【优化】代码生成器的前端展示效果,例如说 Java 包路径合并 | |
| 33 | -*【移除】将 `yudao-core-service` 模块移除,替换成每个 Maven Module 暴露对应的 `yudao-module-***-api` 模块 | |
| 28 | +* 【重构】大模块按照多 Maven Module 的方式拆分,提升可维护性,为后续重构 onemall 提供基础 | |
| 29 | +* 【新增】Spring Security 支持读取多种用户类型,从不同的数据库表,从而实现单项目提供管理后台、用户 APP 的不同 RESTful API 接口 | |
| 30 | +* 【新增】Spring Security 新增 AuthorizeRequestsCustomizer 抽象类, 自定义每个 Maven Module 的 URL 的安全配置 | |
| 31 | +* 【新增】代码生成器支持多 Maven Module 的方式生成代码,支持管理后台、用户 APP 两种场景的 RESTful API 的生成,支持 H2 SQL 脚本的生成 | |
| 32 | +* 【重构】将数据库文档调整到 tool 模块,更加明确 | |
| 33 | +* 【优化】代码生成器的前端展示效果,例如说 Java 包路径合并 | |
| 34 | +* 【移除】将 `yudao-core-service` 模块移除,替换成每个 Maven Module 暴露对应的 `yudao-module-***-api` 模块 | |
| 34 | 35 | |
| 35 | 36 | ### 🐞 Bug Fixes |
| 36 | 37 | |
| 37 | -*【修复】用户无权限访问 指定 API 时,未返回 FORBIDDEN 结果码 | |
| 38 | -*【修复】定时任务刷新本地缓存时,无租户上线文,导致查询报错 | |
| 39 | -*【修复】配置中心只加载了删除的配置 | |
| 38 | +* 【修复】用户无权限访问 指定 API 时,未返回 FORBIDDEN 结果码 | |
| 39 | +* 【修复】定时任务刷新本地缓存时,无租户上线文,导致查询报错 | |
| 40 | +* 【修复】配置中心只加载了删除的配置 | |
| 40 | 41 | |
| 41 | 42 | ### 🔨 Dependency Upgrades |
| 42 | 43 | |
| 44 | +*【升级】spring-boot from 2.4.12 to 2.5.9,最新的 Spring Boot 2.6.X 在等更流行一些,稳定第一 | |
| 43 | 45 | *【移除】Apache FreeMarker 依赖,修改 Screw 使用 Velocity 作为模板引擎 |
| 44 | 46 | |
| 45 | 47 | ## [v1.3.0] 2022.01.24 | ... | ... |