289 lines
11 KiB
XML
289 lines
11 KiB
XML
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
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>
|
|
|
|
<groupId>top.crushtj</groupId>
|
|
<artifactId>xiaoyishu</artifactId>
|
|
<version>${revision}</version>
|
|
|
|
<!-- 项目名称 -->
|
|
<name>${project.artifactId}</name>
|
|
<!-- 项目描述 -->
|
|
<description>小壹书(仿小红书),基于 Spring Cloud Alibaba 微服务架构</description>
|
|
|
|
<!-- 多模块项目需要配置打包方式为 pom -->
|
|
<packaging>pom</packaging>
|
|
|
|
<!-- 子模块管理 -->
|
|
<modules>
|
|
<module>xiaoyi-auth</module>
|
|
<module>xiaoyi-framework</module>
|
|
<module>xiaoyi-gateway</module>
|
|
</modules>
|
|
|
|
<properties>
|
|
<!-- 项目版本号 -->
|
|
<revision>0.0.1-SNAPSHOT</revision>
|
|
<!-- JDK 版本 -->
|
|
<java.version>17</java.version>
|
|
<maven.compiler.source>${java.version}</maven.compiler.source>
|
|
<maven.compiler.target>${java.version}</maven.compiler.target>
|
|
<!-- 项目编码 -->
|
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
<!-- Maven 相关版本号 -->
|
|
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
|
|
|
|
<!-- 依赖包版本 -->
|
|
<lombok.version>1.18.30</lombok.version>
|
|
<spring-boot.version>3.0.2</spring-boot.version>
|
|
<spring-cloud-alibaba.version>2022.0.0.0</spring-cloud-alibaba.version>
|
|
<spring-cloud.version>2022.0.0</spring-cloud.version>
|
|
<jackson.version>2.16.1</jackson.version>
|
|
<mysql-connector-java.version>8.0.29</mysql-connector-java.version>
|
|
<mybatis-plus.version>3.5.5</mybatis-plus.version>
|
|
<druid.version>1.2.27</druid.version>
|
|
<flatten-maven-plugin.version>1.5.0</flatten-maven-plugin.version>
|
|
<jansi.version>1.18</jansi.version>
|
|
<sa-token.version>1.38.0</sa-token.version>
|
|
<guava.version>33.0.0-jre</guava.version>
|
|
<hutool.version>5.8.26</hutool.version>
|
|
<commons-lang3.version>3.12.0</commons-lang3.version>
|
|
<dypnsapi.version>2.0.0</dypnsapi.version>
|
|
<jasypt-starter.version>3.0.5</jasypt-starter.version>
|
|
<nacos-config.version>0.3.0-RC</nacos-config.version>
|
|
</properties>
|
|
|
|
<!-- 统一依赖管理 -->
|
|
<dependencyManagement>
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>top.crushtj</groupId>
|
|
<artifactId>xiaoyi-common</artifactId>
|
|
<version>${revision}</version>
|
|
</dependency>
|
|
<!-- 业务接口日志组件 -->
|
|
<dependency>
|
|
<groupId>top.crushtj</groupId>
|
|
<artifactId>xiaoyi-spring-boot-starter-biz-operationlog</artifactId>
|
|
<version>${revision}</version>
|
|
</dependency>
|
|
|
|
<!-- 业务接口日志组件 -->
|
|
<dependency>
|
|
<groupId>top.crushtj</groupId>
|
|
<artifactId>xiaoyi-spring-boot-starter-jackson</artifactId>
|
|
<version>${revision}</version>
|
|
</dependency>
|
|
<!-- Spring Boot 官方依赖管理 -->
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-dependencies</artifactId>
|
|
<version>${spring-boot.version}</version>
|
|
<type>pom</type>
|
|
<scope>import</scope>
|
|
</dependency>
|
|
|
|
<!-- Spring Cloud Alibaba 官方依赖管理 -->
|
|
<dependency>
|
|
<groupId>com.alibaba.cloud</groupId>
|
|
<artifactId>spring-cloud-alibaba-dependencies</artifactId>
|
|
<version>${spring-cloud-alibaba.version}</version>
|
|
<type>pom</type>
|
|
<scope>import</scope>
|
|
</dependency>
|
|
|
|
<!-- Spring Cloud 官方依赖管理 -->
|
|
<dependency>
|
|
<groupId>org.springframework.cloud</groupId>
|
|
<artifactId>spring-cloud-dependencies</artifactId>
|
|
<version>${spring-cloud.version}</version>
|
|
<type>pom</type>
|
|
<scope>import</scope>
|
|
</dependency>
|
|
|
|
<!-- 避免编写那些冗余的 Java 样板式代码,如 get、set 等 -->
|
|
<dependency>
|
|
<groupId>org.projectlombok</groupId>
|
|
<artifactId>lombok</artifactId>
|
|
<version>${lombok.version}</version>
|
|
</dependency>
|
|
|
|
<!-- Jackson -->
|
|
<dependency>
|
|
<groupId>com.fasterxml.jackson.core</groupId>
|
|
<artifactId>jackson-databind</artifactId>
|
|
<version>${jackson.version}</version>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>com.fasterxml.jackson.core</groupId>
|
|
<artifactId>jackson-core</artifactId>
|
|
<version>${jackson.version}</version>
|
|
</dependency>
|
|
<!-- Mybatis-Plus -->
|
|
<dependency>
|
|
<groupId>com.baomidou</groupId>
|
|
<artifactId>mybatis-plus-boot-starter</artifactId>
|
|
<version>${mybatis-plus.version}</version>
|
|
</dependency>
|
|
|
|
<!-- MySQL 驱动 -->
|
|
<dependency>
|
|
<groupId>mysql</groupId>
|
|
<artifactId>mysql-connector-java</artifactId>
|
|
<version>${mysql-connector-java.version}</version>
|
|
</dependency>
|
|
<!-- Druid 数据库连接池 -->
|
|
<dependency>
|
|
<groupId>com.alibaba</groupId>
|
|
<artifactId>druid-spring-boot-3-starter</artifactId>
|
|
<version>${druid.version}</version>
|
|
</dependency>
|
|
|
|
<!-- sa-token 认证组件 -->
|
|
<dependency>
|
|
<groupId>cn.dev33</groupId>
|
|
<artifactId>sa-token-spring-boot3-starter</artifactId>
|
|
<version>${sa-token.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>cn.dev33</groupId>
|
|
<artifactId>sa-token-reactor-spring-boot3-starter</artifactId>
|
|
<version>${sa-token.version}</version>
|
|
</dependency>
|
|
<!-- Sa-Token 整合 Redis (使用 jackson 序列化方式) -->
|
|
<dependency>
|
|
<groupId>cn.dev33</groupId>
|
|
<artifactId>sa-token-redis-jackson</artifactId>
|
|
<version>${sa-token.version}</version>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>org.fusesource.jansi</groupId>
|
|
<artifactId>jansi</artifactId>
|
|
<version>${jansi.version}</version>
|
|
</dependency>
|
|
|
|
<!-- 常用工具类 -->
|
|
<dependency>
|
|
<groupId>com.google.guava</groupId>
|
|
<artifactId>guava</artifactId>
|
|
<version>${guava.version}</version>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>cn.hutool</groupId>
|
|
<artifactId>hutool-all</artifactId>
|
|
<version>${hutool.version}</version>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>org.apache.commons</groupId>
|
|
<artifactId>commons-lang3</artifactId>
|
|
<version>${commons-lang3.version}</version>
|
|
</dependency>
|
|
|
|
<!--阿里云短信认证服务-->
|
|
<dependency>
|
|
<groupId>com.aliyun</groupId>
|
|
<artifactId>dypnsapi20170525</artifactId>
|
|
<version>${dypnsapi.version}</version>
|
|
</dependency>
|
|
|
|
<!-- jasypt 加密工具 -->
|
|
<dependency>
|
|
<groupId>com.github.ulisesbocchio</groupId>
|
|
<artifactId>jasypt-spring-boot-starter</artifactId>
|
|
<version>${jasypt-starter.version}</version>
|
|
</dependency>
|
|
<!-- Nacos配置中心 -->
|
|
<dependency>
|
|
<groupId>com.alibaba.boot</groupId>
|
|
<artifactId>nacos-config-spring-boot-starter</artifactId>
|
|
<version>${nacos-config.version}</version>
|
|
</dependency>
|
|
</dependencies>
|
|
</dependencyManagement>
|
|
|
|
<build>
|
|
<!-- 统一插件管理 -->
|
|
<pluginManagement>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
|
<version>${spring-boot.version}</version>
|
|
<executions>
|
|
<execution>
|
|
<id>repackage</id>
|
|
<goals>
|
|
<goal>repackage</goal> <!-- 将依赖的 Jar 一起打包 -->
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<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>
|
|
<encoding>${project.build.sourceEncoding}</encoding>
|
|
<annotationProcessorPaths>
|
|
<path>
|
|
<groupId>org.projectlombok</groupId>
|
|
<artifactId>lombok</artifactId>
|
|
<version>${lombok.version}</version>
|
|
</path>
|
|
</annotationProcessorPaths>
|
|
</configuration>
|
|
</plugin>
|
|
</plugins>
|
|
</pluginManagement>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.codehaus.mojo</groupId>
|
|
<artifactId>flatten-maven-plugin</artifactId>
|
|
<version>${flatten-maven-plugin.version}</version>
|
|
<configuration>
|
|
<flattenMode>resolveCiFriendliesOnly</flattenMode>
|
|
<updatePomFile>true</updatePomFile>
|
|
</configuration>
|
|
<executions>
|
|
<execution>
|
|
<id>flatten</id>
|
|
<phase>process-resources</phase>
|
|
<goals>
|
|
<goal>flatten</goal>
|
|
</goals>
|
|
</execution>
|
|
<execution>
|
|
<id>flatten.clean</id>
|
|
<phase>clean</phase>
|
|
<goals>
|
|
<goal>clean</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
</plugins>
|
|
|
|
</build>
|
|
|
|
<!-- 添加华为云、阿里云 maven 中央仓库,提升依赖下载速度 -->
|
|
<repositories>
|
|
<repository>
|
|
<id>huaweicloud</id>
|
|
<name>huawei</name>
|
|
<url>https://mirrors.huaweicloud.com/repository/maven/</url>
|
|
</repository>
|
|
<repository>
|
|
<id>aliyunmaven</id>
|
|
<name>aliyun</name>
|
|
<url>https://maven.aliyun.com/repository/public</url>
|
|
</repository>
|
|
</repositories>
|
|
|
|
</project> |