项目结构调整 x 7 : 有点问题

This commit is contained in:
YunaiV 2021-04-29 09:49:08 +08:00
parent 21e3475d82
commit c4cbd730db
4 changed files with 246 additions and 157 deletions

54
pom.xml
View File

@ -20,6 +20,14 @@
<properties> <properties>
<revision>1.0.0</revision> <revision>1.0.0</revision>
<!-- Maven 相关 -->
<maven-compiler-plugin.version>3.8.0</maven-compiler-plugin.version>
<!-- 统一依赖管理 -->
<spring.boot.version>2.4.4</spring.boot.version>
<!-- 工具类相关 -->
<lombok.version>1.16.14</lombok.version>
<mapstruct.version>1.4.1.Final</mapstruct.version>
</properties> </properties>
<dependencyManagement> <dependencyManagement>
@ -34,4 +42,50 @@
</dependencies> </dependencies>
</dependencyManagement> </dependencyManagement>
<build>
<pluginManagement>
<plugins>
<!-- 打包 -->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring.boot.version}</version>
<configuration>
<fork>true</fork>
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal> <!-- 将原来的 jar 打入其中 -->
</goals>
</execution>
</executions>
</plugin>
<!-- 提供给 mapstruct 使用 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<annotationProcessorPaths>
<path>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>${mapstruct.version}</version>
</path>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project> </project>

View File

@ -16,46 +16,25 @@
<properties> <properties>
<revision>1.0.0</revision> <revision>1.0.0</revision>
<!-- Maven 相关 -->
<maven-compiler-plugin.version>3.8.0</maven-compiler-plugin.version>
<!-- 统一依赖管理 -->
<spring.boot.version>2.4.4</spring.boot.version>
<!-- 工具类相关 -->
<lombok.version>1.16.14</lombok.version>
<mapstruct.version>1.4.1.Final</mapstruct.version>
</properties> </properties>
<dependencies> <dependencies>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.46</version> <!-- TODO 强制版本 -->
</dependency>
<dependency> <dependency>
<groupId>cn.iocoder.boot</groupId> <groupId>cn.iocoder.boot</groupId>
<artifactId>yudao-framework</artifactId> <artifactId>yudao-framework</artifactId>
<version>${revision}</version> <version>${revision}</version>
</dependency> <exclusions>
<exclusion>
<!-- 工具类相关 --> <groupId>mysql</groupId>
<dependency> <artifactId>mysql-connector-java</artifactId>
<groupId>org.projectlombok</groupId> </exclusion>
<artifactId>lombok</artifactId> </exclusions>
</dependency>
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct</artifactId> <!-- use mapstruct-jdk8 for Java 8 or higher -->
</dependency>
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-jdk8</artifactId>
</dependency>
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
</dependency> </dependency>
<!-- Test 测试相关 --> <!-- Test 测试相关 -->
@ -82,48 +61,36 @@
<artifactId>podam</artifactId> <artifactId>podam</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<!-- 工具类相关 -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct</artifactId> <!-- use mapstruct-jdk8 for Java 8 or higher -->
</dependency>
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-jdk8</artifactId>
</dependency>
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
</dependency>
</dependencies> </dependencies>
<build> <build>
<!-- 设置构建的 jar 包名 -->
<finalName>${project.artifactId}</finalName>
<!-- 使用 spring-boot-maven-plugin 插件打包 -->
<plugins> <plugins>
<!-- 打包 -->
<plugin> <plugin>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId> <artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring.boot.version}</version>
<configuration>
<fork>true</fork>
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal> <!-- 将原来的 jar 打入其中 -->
</goals>
</execution>
</executions>
</plugin>
<!-- 提供给 mapstruct 使用 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<annotationProcessorPaths>
<path>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>${mapstruct.version}</version>
</path>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>

View File

@ -25,6 +25,21 @@
<maven-compiler-plugin.version>3.8.0</maven-compiler-plugin.version> <maven-compiler-plugin.version>3.8.0</maven-compiler-plugin.version>
<!-- 统一依赖管理 --> <!-- 统一依赖管理 -->
<spring.boot.version>2.4.4</spring.boot.version> <spring.boot.version>2.4.4</spring.boot.version>
<!-- DB 相关 -->
<mysql-connector-java.version>5.1.46</mysql-connector-java.version>
<druid.version>1.2.4</druid.version>
<mybatis-plus.version>3.4.2</mybatis-plus.version>
<dynamic-datasource.version>3.3.2</dynamic-datasource.version>
<redisson.version>3.15.1</redisson.version>
<!-- Config 配置中心相关 -->
<apollo.version>1.7.0</apollo.version>
<!-- Job 定时任务相关 -->
<!-- 服务保障相关 -->
<lock4j.version>2.2.0</lock4j.version>
<resilience4j.version>1.7.0</resilience4j.version>
<!-- 监控相关 -->
<skywalking.version>8.5.0</skywalking.version>
<spring-boot-admin.version>2.3.1</spring-boot-admin.version>
<!-- Test 测试相关 --> <!-- Test 测试相关 -->
<podam.version>7.2.6.RELEASE</podam.version> <podam.version>7.2.6.RELEASE</podam.version>
<jedis-mock.version>0.1.16</jedis-mock.version> <jedis-mock.version>0.1.16</jedis-mock.version>
@ -50,16 +65,111 @@
<version>${spring.boot.version}</version> <version>${spring.boot.version}</version>
<type>pom</type> <type>pom</type>
<scope>import</scope> <scope>import</scope>
<exclusions>
<exclusion>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</exclusion>
</exclusions>
</dependency> </dependency>
<!-- Spring 核心 --> <!-- Spring 核心 -->
<dependency>
<!-- 用于生成自定义的 Spring @ConfigurationProperties 配置类的说明文件 -->
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<version>${spring.boot.version}</version>
</dependency>
<!-- DB 相关 -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>${mysql-connector-java.version}</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
<version>${druid.version}</version>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>${mybatis-plus.version}</version>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>dynamic-datasource-spring-boot-starter</artifactId> <!-- 多数据源 -->
<version>${dynamic-datasource.version}</version>
</dependency>
<dependency>
<groupId>org.redisson</groupId>
<artifactId>redisson-spring-boot-starter</artifactId>
<version>${redisson.version}</version>
</dependency>
<!-- Config 配置中心相关 -->
<dependency>
<groupId>com.ctrip.framework.apollo</groupId>
<artifactId>apollo-client</artifactId> <!-- 引入 Apollo Client 库,实现内嵌的配置中心 -->
<version>${apollo.version}</version>
</dependency>
<!-- Job 定时任务相关 -->
<!-- 服务保障相关 -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>lock4j-redisson-spring-boot-starter</artifactId>
<version>${lock4j.version}</version>
<exclusions>
<exclusion>
<artifactId>redisson-spring-boot-starter</artifactId>
<groupId>org.redisson</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.github.resilience4j</groupId>
<artifactId>resilience4j-spring-boot2</artifactId>
<version>${resilience4j.version}</version>
</dependency>
<!-- 监控相关 -->
<dependency>
<groupId>org.apache.skywalking</groupId>
<artifactId>apm-toolkit-trace</artifactId>
<version>${skywalking.version}</version>
</dependency>
<dependency>
<groupId>org.apache.skywalking</groupId>
<artifactId>apm-toolkit-logback-1.x</artifactId>
<version>${skywalking.version}</version>
</dependency>
<dependency>
<groupId>org.apache.skywalking</groupId>
<artifactId>apm-toolkit-opentracing</artifactId>
<version>${skywalking.version}</version>
</dependency>
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-starter-server</artifactId> <!-- 实现 Spring Boot Admin Server 服务端 -->
<version>${spring-boot-admin.version}</version>
</dependency>
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-starter-client</artifactId> <!-- 实现 Spring Boot Admin Server 服务端 -->
<version>${spring-boot-admin.version}</version>
</dependency>
<!-- Test 测试相关 --> <!-- Test 测试相关 -->
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId> <artifactId>spring-boot-starter-test</artifactId>
<version>${spring.boot.version}</version> <version>${spring.boot.version}</version>
<scope>test</scope>
<exclusions> <exclusions>
<exclusion> <exclusion>
<artifactId>asm</artifactId> <artifactId>asm</artifactId>
@ -72,14 +182,12 @@
<groupId>com.github.fppt</groupId> <!-- 单元测试,我们采用内嵌的 Redis 数据库 --> <groupId>com.github.fppt</groupId> <!-- 单元测试,我们采用内嵌的 Redis 数据库 -->
<artifactId>jedis-mock</artifactId> <artifactId>jedis-mock</artifactId>
<version>${jedis-mock.version}</version> <version>${jedis-mock.version}</version>
<scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>uk.co.jemos.podam</groupId> <!-- 单元测试,随机生成 POJO 类 --> <groupId>uk.co.jemos.podam</groupId> <!-- 单元测试,随机生成 POJO 类 -->
<artifactId>podam</artifactId> <artifactId>podam</artifactId>
<version>${podam.version}</version> <version>${podam.version}</version>
<scope>test</scope>
</dependency> </dependency>
<!-- 工具类相关 --> <!-- 工具类相关 -->
@ -87,7 +195,6 @@
<groupId>org.projectlombok</groupId> <groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId> <artifactId>lombok</artifactId>
<version>${lombok.version}</version> <version>${lombok.version}</version>
<optional>true</optional>
</dependency> </dependency>
<dependency> <dependency>
@ -104,7 +211,6 @@
<groupId>org.mapstruct</groupId> <groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId> <artifactId>mapstruct-processor</artifactId>
<version>${mapstruct.version}</version> <version>${mapstruct.version}</version>
<optional>true</optional>
</dependency> </dependency>
<dependency> <dependency>
@ -154,50 +260,50 @@
</dependencies> </dependencies>
</dependencyManagement> </dependencyManagement>
<build> <!-- <build>-->
<pluginManagement> <!-- <pluginManagement>-->
<plugins> <!-- <plugins>-->
<!-- 打包 --> <!-- &lt;!&ndash; 打包 &ndash;&gt;-->
<plugin> <!-- <plugin>-->
<groupId>org.springframework.boot</groupId> <!-- <groupId>org.springframework.boot</groupId>-->
<artifactId>spring-boot-maven-plugin</artifactId> <!-- <artifactId>spring-boot-maven-plugin</artifactId>-->
<version>${spring.boot.version}</version> <!-- <version>${spring.boot.version}</version>-->
<configuration> <!-- <configuration>-->
<fork>true</fork> <!-- <fork>true</fork>-->
</configuration> <!-- </configuration>-->
<executions> <!-- <executions>-->
<execution> <!-- <execution>-->
<goals> <!-- <goals>-->
<goal>repackage</goal> <!-- 将原来的 jar 打入其中 --> <!-- <goal>repackage</goal> &lt;!&ndash; 将原来的 jar 打入其中 &ndash;&gt;-->
</goals> <!-- </goals>-->
</execution> <!-- </execution>-->
</executions> <!-- </executions>-->
</plugin> <!-- </plugin>-->
<!-- 提供给 mapstruct 使用 --> <!-- &lt;!&ndash; 提供给 mapstruct 使用 &ndash;&gt;-->
<plugin> <!-- <plugin>-->
<groupId>org.apache.maven.plugins</groupId> <!-- <groupId>org.apache.maven.plugins</groupId>-->
<artifactId>maven-compiler-plugin</artifactId> <!-- <artifactId>maven-compiler-plugin</artifactId>-->
<version>${maven-compiler-plugin.version}</version> <!-- <version>${maven-compiler-plugin.version}</version>-->
<configuration> <!-- <configuration>-->
<source>${java.version}</source> <!-- <source>${java.version}</source>-->
<target>${java.version}</target> <!-- <target>${java.version}</target>-->
<annotationProcessorPaths> <!-- <annotationProcessorPaths>-->
<path> <!-- <path>-->
<groupId>org.mapstruct</groupId> <!-- <groupId>org.mapstruct</groupId>-->
<artifactId>mapstruct-processor</artifactId> <!-- <artifactId>mapstruct-processor</artifactId>-->
<version>${mapstruct.version}</version> <!-- <version>${mapstruct.version}</version>-->
</path> <!-- </path>-->
<path> <!-- <path>-->
<groupId>org.projectlombok</groupId> <!-- <groupId>org.projectlombok</groupId>-->
<artifactId>lombok</artifactId> <!-- <artifactId>lombok</artifactId>-->
<version>${lombok.version}</version> <!-- <version>${lombok.version}</version>-->
</path> <!-- </path>-->
</annotationProcessorPaths> <!-- </annotationProcessorPaths>-->
</configuration> <!-- </configuration>-->
</plugin> <!-- </plugin>-->
</plugins> <!-- </plugins>-->
</pluginManagement> <!-- </pluginManagement>-->
</build> <!-- </build>-->
</project> </project>

View File

@ -24,21 +24,7 @@
<!-- Web 相关 --> <!-- Web 相关 -->
<knife4j.version>3.0.2</knife4j.version> <knife4j.version>3.0.2</knife4j.version>
<swagger-annotations.version>1.5.22</swagger-annotations.version> <swagger-annotations.version>1.5.22</swagger-annotations.version>
<!-- DB 相关 -->
<mysql-connector-java.version>5.1.46</mysql-connector-java.version>
<druid.version>1.2.4</druid.version>
<mybatis-plus.version>3.4.2</mybatis-plus.version>
<dynamic-datasource.version>3.3.2</dynamic-datasource.version>
<redisson.version>3.15.1</redisson.version>
<!-- Config 配置中心相关 -->
<apollo.version>1.7.0</apollo.version>
<!-- 服务保障相关 -->
<lock4j.version>2.2.0</lock4j.version>
<resilience4j.version>1.7.0</resilience4j.version>
<!-- 监控相关 -->
<skywalking.version>8.5.0</skywalking.version>
<logback.encoder.version>6.1</logback.encoder.version>
<spring-boot-admin.version>2.3.1</spring-boot-admin.version>
</properties> </properties>
<dependencies> <dependencies>
@ -100,35 +86,30 @@
<dependency> <dependency>
<groupId>mysql</groupId> <groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId> <artifactId>mysql-connector-java</artifactId>
<version>${mysql-connector-java.version}</version> <version>5.1.46</version> <!-- TODO 强制版本 -->
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.alibaba</groupId> <groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId> <artifactId>druid-spring-boot-starter</artifactId>
<version>${druid.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.baomidou</groupId> <groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId> <artifactId>mybatis-plus-boot-starter</artifactId>
<version>${mybatis-plus.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.baomidou</groupId> <groupId>com.baomidou</groupId>
<artifactId>dynamic-datasource-spring-boot-starter</artifactId> <!-- 多数据源 --> <artifactId>dynamic-datasource-spring-boot-starter</artifactId> <!-- 多数据源 -->
<version>${dynamic-datasource.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.redisson</groupId> <groupId>org.redisson</groupId>
<artifactId>redisson-spring-boot-starter</artifactId> <artifactId>redisson-spring-boot-starter</artifactId>
<version>${redisson.version}</version>
</dependency> </dependency>
<!-- Config 配置中心相关 --> <!-- Config 配置中心相关 -->
<dependency> <dependency>
<groupId>com.ctrip.framework.apollo</groupId> <groupId>com.ctrip.framework.apollo</groupId>
<artifactId>apollo-client</artifactId> <!-- 引入 Apollo Client 库,实现内嵌的配置中心 --> <artifactId>apollo-client</artifactId> <!-- 引入 Apollo Client 库,实现内嵌的配置中心 -->
<version>${apollo.version}</version>
</dependency> </dependency>
<!-- Job 定时任务相关 --> <!-- Job 定时任务相关 -->
@ -141,47 +122,34 @@
<dependency> <dependency>
<groupId>com.baomidou</groupId> <groupId>com.baomidou</groupId>
<artifactId>lock4j-redisson-spring-boot-starter</artifactId> <artifactId>lock4j-redisson-spring-boot-starter</artifactId>
<version>${lock4j.version}</version>
<exclusions>
<exclusion>
<artifactId>redisson-spring-boot-starter</artifactId>
<groupId>org.redisson</groupId>
</exclusion>
</exclusions>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.github.resilience4j</groupId> <groupId>io.github.resilience4j</groupId>
<artifactId>resilience4j-spring-boot2</artifactId> <artifactId>resilience4j-spring-boot2</artifactId>
<version>${resilience4j.version}</version>
</dependency> </dependency>
<!-- 监控相关 --> <!-- 监控相关 -->
<dependency> <dependency>
<groupId>org.apache.skywalking</groupId> <groupId>org.apache.skywalking</groupId>
<artifactId>apm-toolkit-trace</artifactId> <artifactId>apm-toolkit-trace</artifactId>
<version>${skywalking.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.skywalking</groupId> <groupId>org.apache.skywalking</groupId>
<artifactId>apm-toolkit-logback-1.x</artifactId> <artifactId>apm-toolkit-logback-1.x</artifactId>
<version>${skywalking.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.skywalking</groupId> <groupId>org.apache.skywalking</groupId>
<artifactId>apm-toolkit-opentracing</artifactId> <artifactId>apm-toolkit-opentracing</artifactId>
<version>${skywalking.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>de.codecentric</groupId> <groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-starter-server</artifactId> <!-- 实现 Spring Boot Admin Server 服务端 --> <artifactId>spring-boot-admin-starter-server</artifactId> <!-- 实现 Spring Boot Admin Server 服务端 -->
<version>${spring-boot-admin.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>de.codecentric</groupId> <groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-starter-client</artifactId> <!-- 实现 Spring Boot Admin Server 服务端 --> <artifactId>spring-boot-admin-starter-client</artifactId> <!-- 实现 Spring Boot Admin Server 服务端 -->
<version>${spring-boot-admin.version}</version>
</dependency> </dependency>
<!-- Test 测试相关 --> <!-- Test 测试相关 -->
@ -239,19 +207,16 @@
<dependency> <dependency>
<groupId>com.alibaba</groupId> <groupId>com.alibaba</groupId>
<artifactId>easyexcel</artifactId> <artifactId>easyexcel</artifactId>
<optional>true</optional>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.velocity</groupId> <groupId>org.apache.velocity</groupId>
<artifactId>velocity-engine-core</artifactId> <artifactId>velocity-engine-core</artifactId>
<optional>true</optional>
</dependency> </dependency>
<dependency> <dependency>
<groupId>cn.smallbun.screw</groupId> <groupId>cn.smallbun.screw</groupId>
<artifactId>screw-core</artifactId> <!-- 实现数据库文档 --> <artifactId>screw-core</artifactId> <!-- 实现数据库文档 -->
<optional>true</optional>
</dependency> </dependency>
<!-- 三方云服务相关 --> <!-- 三方云服务相关 -->
@ -260,18 +225,15 @@
<dependency> <dependency>
<groupId>com.yunpian.sdk</groupId> <groupId>com.yunpian.sdk</groupId>
<artifactId>yunpian-java-sdk</artifactId> <artifactId>yunpian-java-sdk</artifactId>
<optional>true</optional>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.aliyun</groupId> <groupId>com.aliyun</groupId>
<artifactId>aliyun-java-sdk-core</artifactId> <artifactId>aliyun-java-sdk-core</artifactId>
<optional>true</optional>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.aliyun</groupId> <groupId>com.aliyun</groupId>
<artifactId>aliyun-java-sdk-dysmsapi</artifactId> <artifactId>aliyun-java-sdk-dysmsapi</artifactId>
<optional>true</optional>
</dependency> </dependency>
<!-- SMS SDK end --> <!-- SMS SDK end -->