add 优化 为 common 的所有功能增加单元测试 确保以后改动的功能一致性

This commit is contained in:
疯狂的狮子Li
2026-09-15 20:05:01 +08:00
parent 08423b73cc
commit 15aece1225
70 changed files with 7193 additions and 355 deletions
+15 -3
View File
@@ -74,7 +74,7 @@
<!-- 统一版本号管理:Maven3.X需要,Maven4.0之后已原生支持 -->
<flatten-maven-plugin.version>1.7.3</flatten-maven-plugin.version>
<!-- 打包默认跳过测试 -->
<maven.test.skip>true</maven.test.skip>
<maven.test.skip>false</maven.test.skip>
</properties>
<profiles>
@@ -113,6 +113,15 @@
</profile>
</profiles>
<dependencies>
<!-- 各子模块统一使用 JUnit 5、Mockito 与 Spring Test -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<!-- 依赖声明 -->
<dependencyManagement>
<dependencies>
@@ -508,8 +517,11 @@
<version>${maven-surefire-plugin.version}</version>
<configuration>
<argLine>-Dfile.encoding=UTF-8</argLine>
<!-- 根据打包环境执行对应的@Tag测试方法 -->
<groups>${profiles.active}</groups>
<!--
暂不启用 groups 标签筛选,确保各模块新增的无标签单元测试默认执行。
需要按环境筛选 @Tag 时,可恢复下方配置并通过 -Dgroups=dev 等参数指定标签。
<groups>${groups}</groups>
-->
<!-- 排除标签 -->
<excludedGroups>exclude</excludedGroups>
</configuration>