|
|
@@ -0,0 +1,243 @@
|
|
|
+<?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>
|
|
|
+
|
|
|
+ <parent>
|
|
|
+ <groupId>org.springframework.boot</groupId>
|
|
|
+ <artifactId>spring-boot-starter-parent</artifactId>
|
|
|
+ <version>3.3.5</version>
|
|
|
+ <relativePath/>
|
|
|
+ </parent>
|
|
|
+
|
|
|
+ <groupId>com.dataeasy</groupId>
|
|
|
+ <artifactId>server</artifactId>
|
|
|
+ <version>1.0-SNAPSHOT</version>
|
|
|
+
|
|
|
+ <properties>
|
|
|
+ <maven.compiler.source>21</maven.compiler.source>
|
|
|
+ <maven.compiler.target>21</maven.compiler.target>
|
|
|
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
|
+ <maven.compiler.source>21</maven.compiler.source>
|
|
|
+ <maven.compiler.target>21</maven.compiler.target>
|
|
|
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
|
+ <java.version>21</java.version>
|
|
|
+ <spring-cloud.version>2023.0.3</spring-cloud.version>
|
|
|
+ <jwt.version>4.4.0</jwt.version>
|
|
|
+ <tk-mybatis.version>5.0.1</tk-mybatis.version>
|
|
|
+ <jasypt.version>3.0.5</jasypt.version>
|
|
|
+ </properties>
|
|
|
+
|
|
|
+ <dependencyManagement>
|
|
|
+ <dependencies>
|
|
|
+ <dependency>
|
|
|
+ <groupId>org.springframework.cloud</groupId>
|
|
|
+ <artifactId>spring-cloud-dependencies</artifactId>
|
|
|
+ <version>${spring-cloud.version}</version>
|
|
|
+ <type>pom</type>
|
|
|
+ <scope>import</scope>
|
|
|
+ </dependency>
|
|
|
+ </dependencies>
|
|
|
+ </dependencyManagement>
|
|
|
+
|
|
|
+ <dependencies>
|
|
|
+ <dependency>
|
|
|
+ <groupId>org.springframework.cloud</groupId>
|
|
|
+ <artifactId>spring-cloud-starter-openfeign</artifactId>
|
|
|
+ </dependency>
|
|
|
+ <dependency>
|
|
|
+ <groupId>org.springframework.boot</groupId>
|
|
|
+ <artifactId>spring-boot-starter-validation</artifactId>
|
|
|
+ </dependency>
|
|
|
+ <dependency>
|
|
|
+ <groupId>org.springframework.boot</groupId>
|
|
|
+ <artifactId>spring-boot-starter-test</artifactId>
|
|
|
+ <scope>test</scope>
|
|
|
+ </dependency>
|
|
|
+ <dependency>
|
|
|
+ <groupId>org.springframework.boot</groupId>
|
|
|
+ <artifactId>spring-boot-starter-web</artifactId>
|
|
|
+ </dependency>
|
|
|
+ <dependency>
|
|
|
+ <groupId>org.springframework.boot</groupId>
|
|
|
+ <artifactId>spring-boot-starter-aop</artifactId>
|
|
|
+ </dependency>
|
|
|
+ <dependency>
|
|
|
+ <groupId>org.springframework.boot</groupId>
|
|
|
+ <artifactId>spring-boot-starter-graphql</artifactId>
|
|
|
+ </dependency>
|
|
|
+ <dependency>
|
|
|
+ <groupId>org.springframework.boot</groupId>
|
|
|
+ <artifactId>spring-boot-starter-cache</artifactId>
|
|
|
+ </dependency>
|
|
|
+ <dependency>
|
|
|
+ <groupId>com.github.ben-manes.caffeine</groupId>
|
|
|
+ <artifactId>caffeine</artifactId>
|
|
|
+ </dependency>
|
|
|
+ <dependency>
|
|
|
+ <groupId>org.springframework</groupId>
|
|
|
+ <artifactId>spring-tx</artifactId>
|
|
|
+ </dependency>
|
|
|
+ <dependency>
|
|
|
+ <groupId>com.mysql</groupId>
|
|
|
+ <artifactId>mysql-connector-j</artifactId>
|
|
|
+ <scope>runtime</scope>
|
|
|
+ </dependency>
|
|
|
+ <dependency>
|
|
|
+ <groupId>org.projectlombok</groupId>
|
|
|
+ <artifactId>lombok</artifactId>
|
|
|
+ <optional>true</optional>
|
|
|
+ </dependency>
|
|
|
+ <dependency>
|
|
|
+ <groupId>tk.mybatis</groupId>
|
|
|
+ <artifactId>mapper-spring-boot-starter</artifactId>
|
|
|
+ <version>${tk-mybatis.version}</version>
|
|
|
+ </dependency>
|
|
|
+ <dependency>
|
|
|
+ <groupId>com.auth0</groupId>
|
|
|
+ <artifactId>java-jwt</artifactId>
|
|
|
+ <version>${jwt.version}</version>
|
|
|
+ </dependency>
|
|
|
+ <dependency>
|
|
|
+ <groupId>com.github.ulisesbocchio</groupId>
|
|
|
+ <artifactId>jasypt-spring-boot-starter</artifactId>
|
|
|
+ <version>${jasypt.version}</version>
|
|
|
+ </dependency>
|
|
|
+ </dependencies>
|
|
|
+
|
|
|
+ <!-- 配置阿里云仓库 -->
|
|
|
+ <repositories>
|
|
|
+ <repository>
|
|
|
+ <id>aliyun-repos</id>
|
|
|
+ <url>https://maven.aliyun.com/repository/public</url>
|
|
|
+ <releases>
|
|
|
+ <enabled>true</enabled>
|
|
|
+ </releases>
|
|
|
+ <snapshots>
|
|
|
+ <enabled>false</enabled>
|
|
|
+ </snapshots>
|
|
|
+ </repository>
|
|
|
+ </repositories>
|
|
|
+ <pluginRepositories>
|
|
|
+ <pluginRepository>
|
|
|
+ <id>aliyun-repos</id>
|
|
|
+ <url>https://maven.aliyun.com/repository/public</url>
|
|
|
+ <releases>
|
|
|
+ <enabled>true</enabled>
|
|
|
+ </releases>
|
|
|
+ <snapshots>
|
|
|
+ <enabled>false</enabled>
|
|
|
+ </snapshots>
|
|
|
+ </pluginRepository>
|
|
|
+ </pluginRepositories>
|
|
|
+
|
|
|
+ <build>
|
|
|
+ <plugins>
|
|
|
+ <plugin>
|
|
|
+ <groupId>org.springframework.boot</groupId>
|
|
|
+ <artifactId>spring-boot-maven-plugin</artifactId>
|
|
|
+ <configuration>
|
|
|
+ <!--引入第三方jar包时,不添加则引入的第三方jar不会被打入jar包中-->
|
|
|
+ <includeSystemScope>true</includeSystemScope>
|
|
|
+ <!--排除第三方jar文件-->
|
|
|
+ <includes>
|
|
|
+ <include>
|
|
|
+ <groupId>nothing</groupId>
|
|
|
+ <artifactId>nothing</artifactId>
|
|
|
+ </include>
|
|
|
+ </includes>
|
|
|
+ <excludes>
|
|
|
+ <exclude>
|
|
|
+ <groupId>org.projectlombok</groupId>
|
|
|
+ <artifactId>lombok</artifactId>
|
|
|
+ </exclude>
|
|
|
+ </excludes>
|
|
|
+ </configuration>
|
|
|
+ <executions>
|
|
|
+ <execution>
|
|
|
+ <goals>
|
|
|
+ <goal>repackage</goal>
|
|
|
+ </goals>
|
|
|
+ </execution>
|
|
|
+ </executions>
|
|
|
+ </plugin>
|
|
|
+
|
|
|
+ <!-- 2、完成对Java代码的编译,可以指定项目源码的jdk版本,编译后的jdk版本,以及编码 -->
|
|
|
+ <plugin>
|
|
|
+ <groupId>org.apache.maven.plugins</groupId>
|
|
|
+ <artifactId>maven-compiler-plugin</artifactId>
|
|
|
+ <configuration>
|
|
|
+ <!-- 源代码使用的JDK版本 -->
|
|
|
+ <source>${java.version}</source>
|
|
|
+ <!-- 需要生成的目标class文件的编译版本 -->
|
|
|
+ <target>${java.version}</target>
|
|
|
+ <!-- 字符集编码 -->
|
|
|
+ <encoding>UTF-8</encoding>
|
|
|
+ <!-- 用来传递编译器自身不包含但是却支持的参数选项 -->
|
|
|
+ <!-- <compilerArguments>-->
|
|
|
+ <!-- <verbose/>-->
|
|
|
+ <!-- <!– windwos环境(二选一) –>-->
|
|
|
+ <!-- <bootclasspath>${java.home}/lib/rt.jar:${java.home}/lib/jce.jar</bootclasspath>-->
|
|
|
+ <!-- <!– Linux环境(二选一) –>-->
|
|
|
+ <!-- <bootclasspath>${java.home}/lib/rt.jar:${java.home}/lib/jce.jar</bootclasspath>-->
|
|
|
+ <!-- </compilerArguments>-->
|
|
|
+ <annotationProcessorPaths>
|
|
|
+ <path>
|
|
|
+ <groupId>org.projectlombok</groupId>
|
|
|
+ <artifactId>lombok</artifactId>
|
|
|
+ <version>${lombok.version}</version>
|
|
|
+ </path>
|
|
|
+ </annotationProcessorPaths>
|
|
|
+ </configuration>
|
|
|
+ </plugin>
|
|
|
+
|
|
|
+ <!-- 3、将所有依赖的jar文件复制到target/lib目录 -->
|
|
|
+ <plugin>
|
|
|
+ <groupId>org.apache.maven.plugins</groupId>
|
|
|
+ <artifactId>maven-dependency-plugin</artifactId>
|
|
|
+ <executions>
|
|
|
+ <execution>
|
|
|
+ <id>copy-dependencies</id>
|
|
|
+ <phase>prepare-package</phase>
|
|
|
+ <goals>
|
|
|
+ <goal>copy-dependencies</goal>
|
|
|
+ </goals>
|
|
|
+ <configuration>
|
|
|
+ <!--复制到哪个路径,${project.build.directory} 缺醒为 target,其他内置参数见下面解释-->
|
|
|
+ <outputDirectory>${project.build.directory}/lib</outputDirectory>
|
|
|
+ <overWriteReleases>false</overWriteReleases>
|
|
|
+ <overWriteSnapshots>false</overWriteSnapshots>
|
|
|
+ <overWriteIfNewer>true</overWriteIfNewer>
|
|
|
+ </configuration>
|
|
|
+ </execution>
|
|
|
+ </executions>
|
|
|
+ </plugin>
|
|
|
+
|
|
|
+ <!-- 4、指定启动类,指定配置文件,将依赖打成外部jar包 -->
|
|
|
+ <plugin>
|
|
|
+ <groupId>org.apache.maven.plugins</groupId>
|
|
|
+ <artifactId>maven-jar-plugin</artifactId>
|
|
|
+ <configuration>
|
|
|
+ <archive>
|
|
|
+ <manifest>
|
|
|
+ <!-- 是否要把第三方jar加入到类构建路径 -->
|
|
|
+ <addClasspath>true</addClasspath>
|
|
|
+ <!-- 外部依赖jar包的最终位置 -->
|
|
|
+ <classpathPrefix>lib/</classpathPrefix>
|
|
|
+ <!-- 项目启动类 -->
|
|
|
+ <mainClass>com.punchsettle.server.Application</mainClass>
|
|
|
+ </manifest>
|
|
|
+ </archive>
|
|
|
+ <!--资源文件不打进jar包中,做到配置跟项目分离的效果-->
|
|
|
+ <!-- <excludes>-->
|
|
|
+ <!-- <!– 业务jar中过滤application.properties/yml文件,在jar包外控制 –>-->
|
|
|
+ <!-- <exclude>*.properties</exclude>-->
|
|
|
+ <!-- <exclude>*.xml</exclude>-->
|
|
|
+ <!-- <exclude>*.yml</exclude>-->
|
|
|
+ <!-- </excludes>-->
|
|
|
+ </configuration>
|
|
|
+ </plugin>
|
|
|
+ </plugins>
|
|
|
+ </build>
|
|
|
+</project>
|