2025-03-10 15:40:51 +08:00
|
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
|
<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>com.imooc</groupId>
|
|
|
|
|
<artifactId>imooc-red-book-dev</artifactId>
|
|
|
|
|
<version>1.0-SNAPSHOT</version>
|
|
|
|
|
|
|
|
|
|
<packaging>pom</packaging>
|
|
|
|
|
<modules>
|
|
|
|
|
<module>book-common</module>
|
|
|
|
|
<module>book-model</module>
|
|
|
|
|
<module>book-mapper</module>
|
|
|
|
|
<module>book-service</module>
|
|
|
|
|
<module>book-api</module>
|
|
|
|
|
</modules>
|
|
|
|
|
|
|
|
|
|
<parent>
|
|
|
|
|
<groupId>org.springframework.boot</groupId>
|
|
|
|
|
<artifactId>spring-boot-starter-parent</artifactId>
|
|
|
|
|
<version>2.5.4</version>
|
|
|
|
|
<relativePath />
|
|
|
|
|
</parent>
|
|
|
|
|
|
|
|
|
|
<properties>
|
|
|
|
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
|
|
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
|
|
|
|
<java.version>1.8</java.version>
|
|
|
|
|
|
|
|
|
|
<mysql-connector-java.version>8.0.26</mysql-connector-java.version>
|
|
|
|
|
<mybatis-spring-boot-starter.version>2.1.0</mybatis-spring-boot-starter.version>
|
|
|
|
|
<mapper-spring-boot-starter.version>2.1.5</mapper-spring-boot-starter.version>
|
|
|
|
|
<pagehelper-spring-boot-starter.version>1.2.12</pagehelper-spring-boot-starter.version>
|
|
|
|
|
|
|
|
|
|
<okhttp.version>4.2.2</okhttp.version>
|
|
|
|
|
<jackson.version>2.10.2</jackson.version>
|
|
|
|
|
|
|
|
|
|
<commons-codec.version>1.11</commons-codec.version>
|
|
|
|
|
<commons-lang3.version>3.4</commons-lang3.version>
|
|
|
|
|
<commons-fileupload.version>1.4</commons-fileupload.version>
|
|
|
|
|
<google-guava.version>28.2-jre</google-guava.version>
|
|
|
|
|
|
|
|
|
|
<slf4j.version>1.7.21</slf4j.version>
|
|
|
|
|
<joda-time.version>2.10.6</joda-time.version>
|
|
|
|
|
</properties>
|
|
|
|
|
|
|
|
|
|
<!--
|
|
|
|
|
使用dependencyManagement的目的是为了保证父工程的干净,
|
|
|
|
|
也就是说父工程他只负责管理依赖,以及依赖的版本,而不会导入额外的jar依赖。
|
|
|
|
|
如此一来父工程的职责就很单一了,而且也符合了面向对象开发的父子继承关系,
|
|
|
|
|
依赖的导入只有在各自的子工程中才会进行导入。
|
|
|
|
|
-->
|
|
|
|
|
<dependencyManagement>
|
|
|
|
|
<dependencies>
|
|
|
|
|
<!-- SpringCloud 依赖 -->
|
|
|
|
|
<dependency>
|
|
|
|
|
<groupId>org.springframework.cloud</groupId>
|
|
|
|
|
<artifactId>spring-cloud-dependencies</artifactId>
|
|
|
|
|
<version>2020.0.4</version>
|
|
|
|
|
<type>pom</type>
|
|
|
|
|
<scope>import</scope>
|
|
|
|
|
</dependency>
|
|
|
|
|
|
|
|
|
|
<!-- SpringCloud Alibaba 依赖 -->
|
|
|
|
|
<dependency>
|
|
|
|
|
<groupId>com.alibaba.cloud</groupId>
|
|
|
|
|
<artifactId>spring-cloud-alibaba-dependencies</artifactId>
|
|
|
|
|
<version>2.2.6.RELEASE</version>
|
|
|
|
|
<type>pom</type>
|
|
|
|
|
<scope>import</scope>
|
|
|
|
|
</dependency>
|
|
|
|
|
|
|
|
|
|
<!-- mysql 驱动 -->
|
|
|
|
|
<dependency>
|
|
|
|
|
<groupId>mysql</groupId>
|
|
|
|
|
<artifactId>mysql-connector-java</artifactId>
|
|
|
|
|
<version>${mysql-connector-java.version}</version>
|
|
|
|
|
</dependency>
|
|
|
|
|
<!-- mybatis -->
|
|
|
|
|
<dependency>
|
|
|
|
|
<groupId>org.mybatis.spring.boot</groupId>
|
|
|
|
|
<artifactId>mybatis-spring-boot-starter</artifactId>
|
|
|
|
|
<version>${mybatis-spring-boot-starter.version}</version>
|
|
|
|
|
</dependency>
|
|
|
|
|
<!-- 通用mapper逆向工具 -->
|
|
|
|
|
<dependency>
|
|
|
|
|
<groupId>tk.mybatis</groupId>
|
|
|
|
|
<artifactId>mapper-spring-boot-starter</artifactId>
|
|
|
|
|
<version>${mapper-spring-boot-starter.version}</version>
|
|
|
|
|
</dependency>
|
|
|
|
|
<!--pagehelper -->
|
|
|
|
|
<dependency>
|
|
|
|
|
<groupId>com.github.pagehelper</groupId>
|
|
|
|
|
<artifactId>pagehelper-spring-boot-starter</artifactId>
|
|
|
|
|
<version>${pagehelper-spring-boot-starter.version}</version>
|
|
|
|
|
</dependency>
|
|
|
|
|
|
|
|
|
|
<!--<dependency>-->
|
|
|
|
|
<!--<groupId>com.squareup.okhttp3</groupId>-->
|
|
|
|
|
<!--<artifactId>okhttp</artifactId>-->
|
|
|
|
|
<!--<version>${okhttp.version}</version>-->
|
|
|
|
|
<!--</dependency>-->
|
|
|
|
|
|
|
|
|
|
<!-- jackson -->
|
|
|
|
|
<dependency>
|
|
|
|
|
<groupId>com.fasterxml.jackson.core</groupId>
|
|
|
|
|
<artifactId>jackson-core</artifactId>
|
|
|
|
|
<version>${jackson.version}</version>
|
|
|
|
|
</dependency>
|
|
|
|
|
<dependency>
|
|
|
|
|
<groupId>com.fasterxml.jackson.core</groupId>
|
|
|
|
|
<artifactId>jackson-annotations</artifactId>
|
|
|
|
|
<version>${jackson.version}</version>
|
|
|
|
|
</dependency>
|
|
|
|
|
<dependency>
|
|
|
|
|
<groupId>com.fasterxml.jackson.core</groupId>
|
|
|
|
|
<artifactId>jackson-databind</artifactId>
|
|
|
|
|
<version>${jackson.version}</version>
|
|
|
|
|
</dependency>
|
|
|
|
|
|
|
|
|
|
<!-- apache 工具类 -->
|
|
|
|
|
<dependency>
|
|
|
|
|
<groupId>commons-codec</groupId>
|
|
|
|
|
<artifactId>commons-codec</artifactId>
|
|
|
|
|
<version>${commons-codec.version}</version>
|
|
|
|
|
</dependency>
|
|
|
|
|
<dependency>
|
|
|
|
|
<groupId>org.apache.commons</groupId>
|
|
|
|
|
<artifactId>commons-lang3</artifactId>
|
|
|
|
|
<version>${commons-lang3.version}</version>
|
|
|
|
|
</dependency>
|
|
|
|
|
<dependency>
|
|
|
|
|
<groupId>commons-fileupload</groupId>
|
|
|
|
|
<artifactId>commons-fileupload</artifactId>
|
|
|
|
|
<version>${commons-fileupload.version}</version>
|
|
|
|
|
</dependency>
|
|
|
|
|
|
|
|
|
|
<!-- google 工具类 -->
|
|
|
|
|
<dependency>
|
|
|
|
|
<groupId>com.google.guava</groupId>
|
|
|
|
|
<artifactId>guava</artifactId>
|
|
|
|
|
<version>${google-guava.version}</version>
|
|
|
|
|
</dependency>
|
|
|
|
|
|
|
|
|
|
<!-- joda-time 时间工具 -->
|
|
|
|
|
<dependency>
|
|
|
|
|
<groupId>joda-time</groupId>
|
|
|
|
|
<artifactId>joda-time</artifactId>
|
|
|
|
|
<version>${joda-time.version}</version>
|
|
|
|
|
</dependency>
|
|
|
|
|
|
|
|
|
|
<!-- knife4j 接口文档工具 -->
|
|
|
|
|
<dependency>
|
|
|
|
|
<groupId>com.github.xiaoymin</groupId>
|
|
|
|
|
<artifactId>knife4j-spring-boot-starter</artifactId>
|
|
|
|
|
<version>2.0.9</version>
|
|
|
|
|
</dependency>
|
|
|
|
|
<dependency>
|
|
|
|
|
<groupId>com.github.xiaoymin</groupId>
|
|
|
|
|
<artifactId>knife4j-springdoc-ui</artifactId>
|
|
|
|
|
<version>3.0.3</version>
|
|
|
|
|
</dependency>
|
|
|
|
|
|
|
|
|
|
<!-- MinIO -->
|
|
|
|
|
<dependency>
|
|
|
|
|
<groupId>io.minio</groupId>
|
|
|
|
|
<artifactId>minio</artifactId>
|
|
|
|
|
<version>8.2.1</version>
|
|
|
|
|
</dependency>
|
|
|
|
|
|
|
|
|
|
</dependencies>
|
|
|
|
|
</dependencyManagement>
|
|
|
|
|
|
|
|
|
|
<build>
|
2025-04-30 21:59:54 +08:00
|
|
|
|
<pluginManagement>
|
|
|
|
|
<plugins>
|
2025-04-30 23:19:09 +08:00
|
|
|
|
<!-- 分离资源文件 开发环境请注释此段代码 -->
|
2025-04-30 21:59:54 +08:00
|
|
|
|
<plugin>
|
|
|
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
|
|
|
<artifactId>maven-resources-plugin</artifactId>
|
|
|
|
|
<executions>
|
|
|
|
|
<execution>
|
|
|
|
|
<id>copy-resources</id>
|
|
|
|
|
<phase>package</phase>
|
|
|
|
|
<goals>
|
|
|
|
|
<goal>copy-resources</goal>
|
|
|
|
|
</goals>
|
|
|
|
|
<configuration>
|
|
|
|
|
<resources>
|
|
|
|
|
<resource>
|
|
|
|
|
<directory>src/main/resources</directory>
|
|
|
|
|
<filtering>true</filtering>
|
|
|
|
|
</resource>
|
|
|
|
|
</resources>
|
|
|
|
|
<outputDirectory>${project.build.directory}/release/config</outputDirectory>
|
|
|
|
|
</configuration>
|
|
|
|
|
</execution>
|
|
|
|
|
</executions>
|
|
|
|
|
</plugin>
|
2025-04-30 23:19:09 +08:00
|
|
|
|
<!-- 开发环境请注释此段代码 -->
|
2025-04-30 21:59:54 +08:00
|
|
|
|
<!-- 分离第三方依赖包 -->
|
|
|
|
|
<plugin>
|
|
|
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
|
|
|
<artifactId>maven-dependency-plugin</artifactId>
|
|
|
|
|
<executions>
|
|
|
|
|
<execution>
|
|
|
|
|
<id>copy-dependencies</id>
|
|
|
|
|
<phase>package</phase>
|
|
|
|
|
<goals>
|
|
|
|
|
<goal>copy-dependencies</goal>
|
|
|
|
|
</goals>
|
|
|
|
|
<configuration>
|
|
|
|
|
<outputDirectory>${project.build.directory}/release/lib</outputDirectory>
|
|
|
|
|
<excludeTransitive>false</excludeTransitive>
|
|
|
|
|
<stripVersion>false</stripVersion>
|
|
|
|
|
<includeScope>runtime</includeScope>
|
|
|
|
|
</configuration>
|
|
|
|
|
</execution>
|
|
|
|
|
</executions>
|
|
|
|
|
</plugin>
|
|
|
|
|
<!-- 打jar包 -->
|
|
|
|
|
<plugin>
|
|
|
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
|
|
|
<artifactId>maven-jar-plugin</artifactId>
|
|
|
|
|
<configuration>
|
|
|
|
|
<excludes>
|
|
|
|
|
<exclude>/static/**</exclude>
|
|
|
|
|
<exclude>/templates/**</exclude>
|
|
|
|
|
<exclude>/slider/**</exclude>
|
|
|
|
|
<exclude>*.**</exclude>
|
|
|
|
|
</excludes>
|
|
|
|
|
<archive>
|
|
|
|
|
<manifest>
|
|
|
|
|
<addClasspath>true</addClasspath>
|
|
|
|
|
<classpathPrefix>lib/</classpathPrefix>
|
|
|
|
|
<useUniqueVersions>false</useUniqueVersions>
|
|
|
|
|
<mainClass></mainClass>
|
|
|
|
|
</manifest>
|
|
|
|
|
<manifestEntries>
|
|
|
|
|
<Class-Path>./config/</Class-Path>
|
|
|
|
|
</manifestEntries>
|
|
|
|
|
</archive>
|
|
|
|
|
<outputDirectory>${project.build.directory}/release</outputDirectory>
|
|
|
|
|
</configuration>
|
|
|
|
|
</plugin>
|
|
|
|
|
<!-- 重新打成springboot的jar包 -->
|
|
|
|
|
<plugin>
|
|
|
|
|
<groupId>org.springframework.boot</groupId>
|
|
|
|
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
|
|
|
|
<configuration>
|
|
|
|
|
<includes>
|
|
|
|
|
<include>
|
|
|
|
|
<groupId>${project.groupId}</groupId>
|
|
|
|
|
<artifactId>${project.artifactId}</artifactId>
|
|
|
|
|
</include>
|
|
|
|
|
</includes>
|
|
|
|
|
<layout>ZIP</layout>
|
|
|
|
|
<addResources>true</addResources>
|
|
|
|
|
<outputDirectory>${project.build.directory}/release</outputDirectory>
|
|
|
|
|
</configuration>
|
|
|
|
|
<executions>
|
|
|
|
|
<execution>
|
|
|
|
|
<goals>
|
|
|
|
|
<goal>repackage</goal>
|
|
|
|
|
</goals>
|
|
|
|
|
</execution>
|
|
|
|
|
</executions>
|
|
|
|
|
</plugin>
|
|
|
|
|
</plugins>
|
|
|
|
|
</pluginManagement>
|
|
|
|
|
|
2025-03-10 15:40:51 +08:00
|
|
|
|
<finalName>${project.artifactId}</finalName>
|
|
|
|
|
<plugins>
|
|
|
|
|
<!-- Java 编译 -->
|
|
|
|
|
<plugin>
|
|
|
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
|
|
|
<artifactId>maven-compiler-plugin</artifactId>
|
|
|
|
|
<configuration>
|
|
|
|
|
<source>1.8</source>
|
|
|
|
|
<target>1.8</target>
|
|
|
|
|
<encoding>UTF-8</encoding>
|
|
|
|
|
</configuration>
|
|
|
|
|
</plugin>
|
|
|
|
|
</plugins>
|
|
|
|
|
</build>
|
|
|
|
|
</project>
|