Commit eec8d12b70997b28c06b57496b765ec41b52430e

Authored by YunaiV
1 parent cf4eeab3

项目结构调整 x 17 : 解决拆分后的报错

@@ -11,11 +11,6 @@ @@ -11,11 +11,6 @@
11 <module>yudao-dependencies</module> 11 <module>yudao-dependencies</module>
12 <module>yudao-framework</module> 12 <module>yudao-framework</module>
13 <module>yudao-admin-server</module> 13 <module>yudao-admin-server</module>
14 - <module>yudao-spring-boot-starter-job</module>  
15 - <module>yudao-spring-boot-starter-config</module>  
16 - <module>yudao-spring-boot-starter-test</module>  
17 - <module>yudao-spring-boot-starter-biz-sms</module>  
18 - <module>yudao-spring-boot-starter-excel</module>  
19 </modules> 14 </modules>
20 15
21 <name>${artifactId}</name> 16 <name>${artifactId}</name>
yudao-admin-server/pom.xml
@@ -22,6 +22,14 @@ @@ -22,6 +22,14 @@
22 <groupId>cn.iocoder.boot</groupId> 22 <groupId>cn.iocoder.boot</groupId>
23 <artifactId>yudao-spring-boot-starter-biz-operatelog</artifactId> 23 <artifactId>yudao-spring-boot-starter-biz-operatelog</artifactId>
24 </dependency> 24 </dependency>
  25 + <dependency>
  26 + <groupId>cn.iocoder.boot</groupId>
  27 + <artifactId>yudao-spring-boot-starter-biz-dict</artifactId>
  28 + </dependency>
  29 + <dependency>
  30 + <groupId>cn.iocoder.boot</groupId>
  31 + <artifactId>yudao-spring-boot-starter-biz-sms</artifactId>
  32 + </dependency>
25 33
26 <!-- Web 相关 --> 34 <!-- Web 相关 -->
27 <dependency> 35 <dependency>
@@ -40,6 +48,29 @@ @@ -40,6 +48,29 @@
40 <artifactId>yudao-spring-boot-starter-mybatis</artifactId> 48 <artifactId>yudao-spring-boot-starter-mybatis</artifactId>
41 </dependency> 49 </dependency>
42 50
  51 + <dependency>
  52 + <groupId>cn.iocoder.boot</groupId>
  53 + <artifactId>yudao-spring-boot-starter-redis</artifactId>
  54 + </dependency>
  55 +
  56 + <!-- Config 配置中心相关 -->
  57 + <dependency>
  58 + <groupId>cn.iocoder.boot</groupId>
  59 + <artifactId>yudao-spring-boot-starter-config</artifactId>
  60 + </dependency>
  61 +
  62 + <!-- Job 定时任务相关 -->
  63 + <dependency>
  64 + <groupId>cn.iocoder.boot</groupId>
  65 + <artifactId>yudao-spring-boot-starter-job</artifactId>
  66 + </dependency>
  67 +
  68 + <!-- 服务保障相关 -->
  69 + <dependency>
  70 + <groupId>cn.iocoder.boot</groupId>
  71 + <artifactId>yudao-spring-boot-starter-protection</artifactId>
  72 + </dependency>
  73 +
43 <!-- 监控相关 --> 74 <!-- 监控相关 -->
44 <dependency> 75 <dependency>
45 <groupId>cn.iocoder.boot</groupId> 76 <groupId>cn.iocoder.boot</groupId>
@@ -60,6 +91,11 @@ @@ -60,6 +91,11 @@
60 91
61 <!-- 工具类相关 --> 92 <!-- 工具类相关 -->
62 <dependency> 93 <dependency>
  94 + <groupId>cn.iocoder.boot</groupId>
  95 + <artifactId>yudao-spring-boot-starter-excel</artifactId>
  96 + </dependency>
  97 +
  98 + <dependency>
63 <groupId>org.apache.velocity</groupId> 99 <groupId>org.apache.velocity</groupId>
64 <artifactId>velocity-engine-core</artifactId> 100 <artifactId>velocity-engine-core</artifactId>
65 </dependency> 101 </dependency>
yudao-framework/pom.xml
@@ -11,7 +11,6 @@ @@ -11,7 +11,6 @@
11 <packaging>pom</packaging> 11 <packaging>pom</packaging>
12 <modules> 12 <modules>
13 <module>yudao-common</module> 13 <module>yudao-common</module>
14 - <module>yudao-framework-all</module>  
15 <module>yudao-spring-boot-starter-mybatis</module> 14 <module>yudao-spring-boot-starter-mybatis</module>
16 <module>yudao-spring-boot-starter-redis</module> 15 <module>yudao-spring-boot-starter-redis</module>
17 <module>yudao-spring-boot-starter-web</module> 16 <module>yudao-spring-boot-starter-web</module>
yudao-framework/yudao-spring-boot-starter-biz-sms/pom.xml
@@ -36,6 +36,12 @@ @@ -36,6 +36,12 @@
36 36
37 <!-- 工具类相关 --> 37 <!-- 工具类相关 -->
38 <dependency> 38 <dependency>
  39 + <groupId>com.google.guava</groupId>
  40 + <artifactId>guava</artifactId>
  41 + <optional>true</optional> <!-- 设置为可选,因为使用到 @VisibleForTesting 用于单元测试 -->
  42 + </dependency>
  43 +
  44 + <dependency>
39 <groupId>com.fasterxml.jackson.core</groupId> 45 <groupId>com.fasterxml.jackson.core</groupId>
40 <artifactId>jackson-databind</artifactId> 46 <artifactId>jackson-databind</artifactId>
41 </dependency> 47 </dependency>
yudao-framework/yudao-spring-boot-starter-biz-sms/src/test/java/cn/iocoder/dashboard/framework/sms/core/client/impl/aliyun/AliyunSmsClientTest.java
1 package cn.iocoder.dashboard.framework.sms.core.client.impl.aliyun; 1 package cn.iocoder.dashboard.framework.sms.core.client.impl.aliyun;
2 2
3 import cn.hutool.core.util.ReflectUtil; 3 import cn.hutool.core.util.ReflectUtil;
4 -import cn.iocoder.dashboard.framework.BaseMockitoUnitTest; 4 +import cn.iocoder.dashboard.framework.test.core.ut.BaseMockitoUnitTest;
5 import cn.iocoder.yudao.framework.common.core.KeyValue; 5 import cn.iocoder.yudao.framework.common.core.KeyValue;
6 import cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants; 6 import cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants;
7 import cn.iocoder.dashboard.framework.sms.core.client.SmsCommonResult; 7 import cn.iocoder.dashboard.framework.sms.core.client.SmsCommonResult;
yudao-framework/yudao-spring-boot-starter-biz-sms/src/test/java/cn/iocoder/dashboard/framework/sms/core/client/impl/yunpian/YunpianSmsClientTest.java
1 package cn.iocoder.dashboard.framework.sms.core.client.impl.yunpian; 1 package cn.iocoder.dashboard.framework.sms.core.client.impl.yunpian;
2 2
3 import cn.hutool.core.util.ReflectUtil; 3 import cn.hutool.core.util.ReflectUtil;
4 -import cn.iocoder.dashboard.framework.BaseMockitoUnitTest; 4 +import cn.iocoder.dashboard.framework.test.core.ut.BaseMockitoUnitTest;
5 import cn.iocoder.yudao.framework.common.core.KeyValue; 5 import cn.iocoder.yudao.framework.common.core.KeyValue;
6 import cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants; 6 import cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants;
7 import cn.iocoder.dashboard.framework.sms.core.client.SmsCommonResult; 7 import cn.iocoder.dashboard.framework.sms.core.client.SmsCommonResult;
yudao-framework/yudao-spring-boot-starter-config/pom.xml
@@ -16,6 +16,11 @@ @@ -16,6 +16,11 @@
16 <url>https://github.com/YunaiV/ruoyi-vue-pro</url> 16 <url>https://github.com/YunaiV/ruoyi-vue-pro</url>
17 17
18 <dependencies> 18 <dependencies>
  19 + <dependency>
  20 + <groupId>cn.iocoder.boot</groupId>
  21 + <artifactId>yudao-common</artifactId>
  22 + </dependency>
  23 +
19 <!-- Spring 核心 --> 24 <!-- Spring 核心 -->
20 <dependency> 25 <dependency>
21 <groupId>org.springframework.boot</groupId> 26 <groupId>org.springframework.boot</groupId>
yudao-framework/yudao-spring-boot-starter-excel/pom.xml
@@ -16,8 +16,26 @@ @@ -16,8 +16,26 @@
16 <url>https://github.com/YunaiV/ruoyi-vue-pro</url> 16 <url>https://github.com/YunaiV/ruoyi-vue-pro</url>
17 17
18 <dependencies> 18 <dependencies>
  19 + <dependency>
  20 + <groupId>cn.iocoder.boot</groupId>
  21 + <artifactId>yudao-common</artifactId>
  22 + </dependency>
  23 +
  24 + <!-- 业务组件 -->
  25 + <dependency>
  26 + <groupId>cn.iocoder.boot</groupId>
  27 + <artifactId>yudao-spring-boot-starter-biz-dict</artifactId>
  28 + <optional>true</optional> <!-- 如果希望使用 @DictFormat 注解,需要引入该依赖 -->
  29 + </dependency>
  30 +
19 <!-- Web 相关 --> 31 <!-- Web 相关 -->
20 <dependency> 32 <dependency>
  33 + <groupId>org.springframework</groupId>
  34 + <artifactId>spring-web</artifactId>
  35 + <scope>provided</scope> <!-- 设置为 provided,只有 ExcelUtils 使用 -->
  36 + </dependency>
  37 +
  38 + <dependency>
21 <groupId>jakarta.servlet</groupId> 39 <groupId>jakarta.servlet</groupId>
22 <artifactId>jakarta.servlet-api</artifactId> 40 <artifactId>jakarta.servlet-api</artifactId>
23 <scope>provided</scope> <!-- 设置为 provided,只有 ExcelUtils 使用 --> 41 <scope>provided</scope> <!-- 设置为 provided,只有 ExcelUtils 使用 -->
yudao-framework/yudao-spring-boot-starter-excel/src/main/java/cn/iocoder/yudao/framework/excel/core/convert/DictConvert.java
1 package cn.iocoder.yudao.framework.excel.core.convert; 1 package cn.iocoder.yudao.framework.excel.core.convert;
2 2
3 -  
4 import cn.hutool.core.convert.Convert; 3 import cn.hutool.core.convert.Convert;
5 import cn.iocoder.yudao.framework.dict.core.dto.DictDataRespDTO; 4 import cn.iocoder.yudao.framework.dict.core.dto.DictDataRespDTO;
6 import cn.iocoder.yudao.framework.dict.core.util.DictUtils; 5 import cn.iocoder.yudao.framework.dict.core.util.DictUtils;
yudao-framework/yudao-spring-boot-starter-job/pom.xml
@@ -16,11 +16,22 @@ @@ -16,11 +16,22 @@
16 <url>https://github.com/YunaiV/ruoyi-vue-pro</url> 16 <url>https://github.com/YunaiV/ruoyi-vue-pro</url>
17 17
18 <dependencies> 18 <dependencies>
  19 + <dependency>
  20 + <groupId>cn.iocoder.boot</groupId>
  21 + <artifactId>yudao-common</artifactId>
  22 + </dependency>
  23 +
19 <!-- Job 定时任务相关 --> 24 <!-- Job 定时任务相关 -->
20 <dependency> 25 <dependency>
21 <groupId>org.springframework.boot</groupId> 26 <groupId>org.springframework.boot</groupId>
22 <artifactId>spring-boot-starter-quartz</artifactId> 27 <artifactId>spring-boot-starter-quartz</artifactId>
23 </dependency> 28 </dependency>
  29 +
  30 + <!-- 工具类相关 -->
  31 + <dependency>
  32 + <groupId>jakarta.validation</groupId>
  33 + <artifactId>jakarta.validation-api</artifactId>
  34 + </dependency>
24 </dependencies> 35 </dependencies>
25 36
26 </project> 37 </project>
yudao-framework/yudao-spring-boot-starter-job/src/main/java/cn/iocoder/dashboard/framework/quartz/core/handler/JobHandlerInvoker.java
@@ -15,8 +15,8 @@ import org.springframework.scheduling.quartz.QuartzJobBean; @@ -15,8 +15,8 @@ import org.springframework.scheduling.quartz.QuartzJobBean;
15 import javax.annotation.Resource; 15 import javax.annotation.Resource;
16 import java.util.Date; 16 import java.util.Date;
17 17
  18 +import static cn.hutool.core.exceptions.ExceptionUtil.getRootCauseMessage;
18 import static cn.iocoder.yudao.framework.common.util.date.DateUtils.diff; 19 import static cn.iocoder.yudao.framework.common.util.date.DateUtils.diff;
19 -import static org.apache.commons.lang3.exception.ExceptionUtils.getRootCauseMessage;  
20 20
21 /** 21 /**
22 * 基础 Job 调用者,负责调用 {@link JobHandler#execute(String)} 执行任务 22 * 基础 Job 调用者,负责调用 {@link JobHandler#execute(String)} 执行任务
yudao-framework/yudao-spring-boot-starter-test/pom.xml
@@ -15,8 +15,12 @@ @@ -15,8 +15,12 @@
15 <description>测试组件,用于单元测试、集成测试</description> 15 <description>测试组件,用于单元测试、集成测试</description>
16 <url>https://github.com/YunaiV/ruoyi-vue-pro</url> 16 <url>https://github.com/YunaiV/ruoyi-vue-pro</url>
17 17
18 -  
19 <dependencies> 18 <dependencies>
  19 + <dependency>
  20 + <groupId>cn.iocoder.boot</groupId>
  21 + <artifactId>yudao-common</artifactId>
  22 + </dependency>
  23 +
20 <!-- Test 测试相关 --> 24 <!-- Test 测试相关 -->
21 <dependency> 25 <dependency>
22 <groupId>org.springframework.boot</groupId> 26 <groupId>org.springframework.boot</groupId>