446 lines
13 KiB
XML
446 lines
13 KiB
XML
<?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 https://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.0</version>
|
||
<relativePath/> <!-- lookup parent from repository -->
|
||
</parent>
|
||
<groupId>com.yfd</groupId>
|
||
<artifactId>platform</artifactId>
|
||
<version>1.0</version>
|
||
<packaging>war</packaging>
|
||
<name>platform</name>
|
||
<description>springboot 项目基础框架3.0</description>
|
||
<properties>
|
||
<java.version>17</java.version>
|
||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||
<spring-cloud-alibaba.version>2023.0.1.0</spring-cloud-alibaba.version>
|
||
<spring-cloud.version>2023.0.1</spring-cloud.version>
|
||
<spring-boot.version>3.3.0</spring-boot.version>
|
||
<maven.compiler.source>17</maven.compiler.source>
|
||
<maven.compiler.target>17</maven.compiler.target>
|
||
<maven.compiler.release>17</maven.compiler.release>
|
||
<mybatis.version>3.5.16</mybatis.version>
|
||
<mybatis-plus.version>3.5.6</mybatis-plus.version>
|
||
<!-- dependency versions -->
|
||
<guava.version>30.0-jre</guava.version>
|
||
<mybatis.spring.boot.starter.version>3.0.3</mybatis.spring.boot.starter.version>
|
||
<druid.version>1.2.20</druid.version>
|
||
<druid.starter.version>1.2.20</druid.starter.version>
|
||
<sqlite-jdbc.version>3.32.3.2</sqlite-jdbc.version>
|
||
<hutool.version>5.8.8</hutool.version>
|
||
<poi.version>4.1.2</poi.version>
|
||
<poi.ooxml.version>4.1.2</poi.ooxml.version>
|
||
<fastjson.version>1.2.70</fastjson.version>
|
||
<springdoc.version>2.5.0</springdoc.version>
|
||
<freemarker.version>2.3.28</freemarker.version>
|
||
<jsoup.version>1.11.3</jsoup.version>
|
||
<jasypt.version>1.16</jasypt.version>
|
||
<ip2region.version>1.7.2</ip2region.version>
|
||
<easy.captcha.version>1.6.2</easy.captcha.version>
|
||
<useragentutils.version>1.21</useragentutils.version>
|
||
|
||
</properties>
|
||
|
||
<!-- 统一管理 MyBatis 相关版本,解决依赖收敛冲突 -->
|
||
<dependencyManagement>
|
||
<dependencies>
|
||
<dependency>
|
||
<groupId>org.mybatis</groupId>
|
||
<artifactId>mybatis</artifactId>
|
||
<version>${mybatis.version}</version>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>org.mybatis</groupId>
|
||
<artifactId>mybatis-spring</artifactId>
|
||
<version>3.0.3</version>
|
||
</dependency>
|
||
</dependencies>
|
||
</dependencyManagement>
|
||
<dependencies>
|
||
|
||
<dependency>
|
||
<groupId>org.springframework.boot</groupId>
|
||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||
</dependency>
|
||
|
||
<!-- spring-web -->
|
||
<dependency>
|
||
<groupId>org.springframework.boot</groupId>
|
||
<artifactId>spring-boot-starter-web</artifactId>
|
||
</dependency>
|
||
|
||
<!-- spring-security -->
|
||
<dependency>
|
||
<groupId>org.springframework.boot</groupId>
|
||
<artifactId>spring-boot-starter-security</artifactId>
|
||
</dependency>
|
||
|
||
<!--Spring boot Redis-->
|
||
<dependency>
|
||
<groupId>org.springframework.boot</groupId>
|
||
<artifactId>spring-boot-starter-data-redis</artifactId>
|
||
</dependency>
|
||
|
||
<!-- WebSocket依赖 -->
|
||
<dependency>
|
||
<groupId>org.springframework.boot</groupId>
|
||
<artifactId>spring-boot-starter-websocket</artifactId>
|
||
</dependency>
|
||
|
||
<!--Spring 缓存-->
|
||
<dependency>
|
||
<groupId>org.springframework.boot</groupId>
|
||
<artifactId>spring-boot-starter-cache</artifactId>
|
||
</dependency>
|
||
|
||
<!-- 测试 -->
|
||
<dependency>
|
||
<groupId>org.springframework.boot</groupId>
|
||
<artifactId>spring-boot-starter-test</artifactId>
|
||
<scope>test</scope>
|
||
</dependency>
|
||
|
||
<!--Guava是一种基于开源的Java库高性能数据缓存-->
|
||
<dependency>
|
||
<groupId>com.google.guava</groupId>
|
||
<artifactId>guava</artifactId>
|
||
<version>${guava.version}</version>
|
||
</dependency>
|
||
|
||
<!-- spring-内置Tomcat-->
|
||
<dependency>
|
||
<groupId>org.springframework.boot</groupId>
|
||
<artifactId>spring-boot-starter-tomcat</artifactId>
|
||
<scope>provided</scope>
|
||
</dependency>
|
||
|
||
<!-- spring-quartz任务-->
|
||
<dependency>
|
||
<groupId>org.springframework.boot</groupId>
|
||
<artifactId>spring-boot-starter-quartz</artifactId>
|
||
</dependency>
|
||
|
||
<!-- spring-elasticsearch搜素-->
|
||
<!-- <dependency>-->
|
||
<!-- <groupId>org.springframework.boot</groupId>-->
|
||
<!-- <artifactId>spring-boot-starter-data-elasticsearch</artifactId>-->
|
||
<!-- </dependency>-->
|
||
|
||
<!-- spring-Mybatis-->
|
||
<dependency>
|
||
<groupId>org.mybatis.spring.boot</groupId>
|
||
<artifactId>mybatis-spring-boot-starter</artifactId>
|
||
<version>${mybatis.spring.boot.starter.version}</version>
|
||
</dependency>
|
||
|
||
<!-- 显式固定 MyBatis 版本,避免与 MyBatis-Plus 不兼容的方法签名问题 -->
|
||
<dependency>
|
||
<groupId>org.mybatis</groupId>
|
||
<artifactId>mybatis</artifactId>
|
||
<version>${mybatis.version}</version>
|
||
</dependency>
|
||
|
||
<!-- druid数据库连接池 -->
|
||
<dependency>
|
||
<groupId>com.alibaba</groupId>
|
||
<artifactId>druid</artifactId>
|
||
<version>${druid.version}</version>
|
||
</dependency>
|
||
|
||
<!--数据库连接-->
|
||
<dependency>
|
||
<groupId>org.springframework.boot</groupId>
|
||
<artifactId>spring-boot-starter-jdbc</artifactId>
|
||
</dependency>
|
||
|
||
<!-- druid相关 -->
|
||
<dependency>
|
||
<groupId>com.alibaba</groupId>
|
||
<artifactId>druid-spring-boot-starter</artifactId>
|
||
<version>${druid.starter.version}</version>
|
||
</dependency>
|
||
|
||
<!-- mysql数据库 -->
|
||
<dependency>
|
||
<groupId>com.mysql</groupId>
|
||
<artifactId>mysql-connector-j</artifactId>
|
||
<scope>runtime</scope>
|
||
</dependency>
|
||
|
||
<!-- sqlite-jdbc数据库 -->
|
||
<dependency>
|
||
<groupId>org.xerial</groupId>
|
||
<artifactId>sqlite-jdbc</artifactId>
|
||
<version>${sqlite-jdbc.version}</version>
|
||
</dependency>
|
||
|
||
<!-- mybatis-plus 数据库扩展插件-->
|
||
<dependency>
|
||
<groupId>com.baomidou</groupId>
|
||
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||
<version>${mybatis-plus.version}</version>
|
||
</dependency>
|
||
|
||
<dependency>
|
||
<groupId>com.baomidou</groupId>
|
||
<artifactId>mybatis-plus-generator</artifactId>
|
||
<version>${mybatis-plus.version}</version>
|
||
</dependency>
|
||
|
||
<!--apache.commons -->
|
||
<dependency>
|
||
<groupId>org.apache.commons</groupId>
|
||
<artifactId>commons-lang3</artifactId>
|
||
</dependency>
|
||
|
||
<!--lombok bean注解 -->
|
||
<dependency>
|
||
<groupId>org.projectlombok</groupId>
|
||
<artifactId>lombok</artifactId>
|
||
<optional>true</optional>
|
||
</dependency>
|
||
|
||
<!-- 日志相关 -->
|
||
<dependency>
|
||
<groupId>org.springframework.boot</groupId>
|
||
<artifactId>spring-boot-starter-aop</artifactId>
|
||
</dependency>
|
||
|
||
<!-- 胡图工具类 -->
|
||
<dependency>
|
||
<groupId>cn.hutool</groupId>
|
||
<artifactId>hutool-all</artifactId>
|
||
<version>${hutool.version}</version>
|
||
</dependency>
|
||
|
||
<!-- excel工具 -->
|
||
<dependency>
|
||
<groupId>org.apache.poi</groupId>
|
||
<artifactId>poi</artifactId>
|
||
<version>${poi.version}</version>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>org.apache.poi</groupId>
|
||
<artifactId>poi-ooxml</artifactId>
|
||
<version>${poi.ooxml.version}</version>
|
||
</dependency>
|
||
|
||
<!-- fastjson -->
|
||
<dependency>
|
||
<groupId>com.alibaba</groupId>
|
||
<artifactId>fastjson</artifactId>
|
||
<version>${fastjson.version}</version>
|
||
</dependency>
|
||
|
||
<!-- Springdoc OpenAPI 替换 Springfox -->
|
||
<dependency>
|
||
<groupId>org.springdoc</groupId>
|
||
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
|
||
<version>${springdoc.version}</version>
|
||
</dependency>
|
||
<!-- Micrometer Prometheus 导出器 -->
|
||
<dependency>
|
||
<groupId>io.micrometer</groupId>
|
||
<artifactId>micrometer-registry-prometheus</artifactId>
|
||
</dependency>
|
||
<!-- 删除重复的 WebSocket 依赖(上方已声明一次) -->
|
||
<dependency>
|
||
<groupId>org.freemarker</groupId>
|
||
<artifactId>freemarker</artifactId>
|
||
<version>${freemarker.version}</version>
|
||
<scope>compile</scope>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>org.jsoup</groupId>
|
||
<artifactId>jsoup</artifactId>
|
||
<version>${jsoup.version}</version>
|
||
</dependency>
|
||
|
||
<!-- 数据库密码加密 -->
|
||
<dependency>
|
||
<groupId>com.github.ulisesbocchio</groupId>
|
||
<artifactId>jasypt-spring-boot-starter</artifactId>
|
||
<version>${jasypt.version}</version>
|
||
</dependency>
|
||
|
||
<dependency>
|
||
<groupId>org.lionsoul</groupId>
|
||
<artifactId>ip2region</artifactId>
|
||
<version>${ip2region.version}</version>
|
||
</dependency>
|
||
|
||
<!-- Java图形验证码 -->
|
||
<dependency>
|
||
<groupId>com.github.whvcse</groupId>
|
||
<artifactId>easy-captcha</artifactId>
|
||
<version>${easy.captcha.version}</version>
|
||
</dependency>
|
||
|
||
<!-- 解析客户端操作系统、浏览器信息 -->
|
||
<dependency>
|
||
<groupId>eu.bitwalker</groupId>
|
||
<artifactId>UserAgentUtils</artifactId>
|
||
<version>${useragentutils.version}</version>
|
||
</dependency>
|
||
<!-- Restore JavaScript engine on JDK 15+ for ArithmeticCaptcha -->
|
||
<dependency>
|
||
<groupId>org.openjdk.nashorn</groupId>
|
||
<artifactId>nashorn-core</artifactId>
|
||
<version>15.4</version>
|
||
</dependency>
|
||
</dependencies>
|
||
|
||
<build>
|
||
<resources>
|
||
<resource>
|
||
<directory>src/main/resources</directory>
|
||
<includes>
|
||
<include>**/*.*</include>
|
||
</includes>
|
||
<filtering>false</filtering>
|
||
</resource>
|
||
<resource>
|
||
<directory>src/main/java</directory>
|
||
<includes>
|
||
<include>**/*.*</include>
|
||
</includes>
|
||
<excludes>
|
||
<exclude>**/*.java</exclude>
|
||
</excludes>
|
||
<filtering>false</filtering>
|
||
</resource>
|
||
|
||
</resources>
|
||
|
||
<plugins>
|
||
<!-- 在 Java 编译前构建前端,并将构建产物复制到后端资源目录 -->
|
||
<plugin>
|
||
<groupId>org.codehaus.mojo</groupId>
|
||
<artifactId>exec-maven-plugin</artifactId>
|
||
<version>3.1.0</version>
|
||
<executions>
|
||
<execution>
|
||
<id>frontend-install</id>
|
||
<phase>generate-resources</phase>
|
||
<goals>
|
||
<goal>exec</goal>
|
||
</goals>
|
||
<configuration>
|
||
<executable>npm</executable>
|
||
<workingDirectory>${project.basedir}/frontend</workingDirectory>
|
||
<arguments>
|
||
<argument>install</argument>
|
||
</arguments>
|
||
</configuration>
|
||
</execution>
|
||
<execution>
|
||
<id>frontend-build</id>
|
||
<phase>generate-resources</phase>
|
||
<goals>
|
||
<goal>exec</goal>
|
||
</goals>
|
||
<configuration>
|
||
<executable>npm</executable>
|
||
<workingDirectory>${project.basedir}/frontend</workingDirectory>
|
||
<arguments>
|
||
<argument>run</argument>
|
||
<argument>build:mvn</argument>
|
||
</arguments>
|
||
</configuration>
|
||
</execution>
|
||
</executions>
|
||
</plugin>
|
||
|
||
<plugin>
|
||
<groupId>org.apache.maven.plugins</groupId>
|
||
<artifactId>maven-resources-plugin</artifactId>
|
||
<version>3.3.1</version>
|
||
<executions>
|
||
<execution>
|
||
<id>copy-frontend</id>
|
||
<phase>process-resources</phase>
|
||
<goals>
|
||
<goal>copy-resources</goal>
|
||
</goals>
|
||
<configuration>
|
||
<outputDirectory>${project.basedir}/src/main/resources/static</outputDirectory>
|
||
<resources>
|
||
<resource>
|
||
<directory>${project.basedir}/frontend/dist</directory>
|
||
<filtering>false</filtering>
|
||
</resource>
|
||
</resources>
|
||
</configuration>
|
||
</execution>
|
||
</executions>
|
||
</plugin>
|
||
<plugin>
|
||
<groupId>org.asciidoctor</groupId>
|
||
<artifactId>asciidoctor-maven-plugin</artifactId>
|
||
<version>1.5.8</version>
|
||
<executions>
|
||
<execution>
|
||
<id>generate-docs</id>
|
||
<phase>prepare-package</phase>
|
||
<goals>
|
||
<goal>process-asciidoc</goal>
|
||
</goals>
|
||
<configuration>
|
||
<backend>html</backend>
|
||
<doctype>book</doctype>
|
||
</configuration>
|
||
</execution>
|
||
</executions>
|
||
</plugin>
|
||
<plugin>
|
||
<groupId>org.springframework.boot</groupId>
|
||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||
<configuration>
|
||
<!-- 统一设置 JVM 编码为 UTF-8,避免控制台中文乱码 -->
|
||
<jvmArguments>-Dfile.encoding=UTF-8</jvmArguments>
|
||
<!-- 以独立 JVM 运行,从而应用 jvmArguments -->
|
||
<fork>true</fork>
|
||
<excludes>
|
||
<exclude>
|
||
<groupId>org.projectlombok</groupId>
|
||
<artifactId>lombok</artifactId>
|
||
</exclude>
|
||
</excludes>
|
||
</configuration>
|
||
</plugin>
|
||
<!-- 固化构建规则:Maven Enforcer -->
|
||
<plugin>
|
||
<groupId>org.apache.maven.plugins</groupId>
|
||
<artifactId>maven-enforcer-plugin</artifactId>
|
||
<version>3.4.1</version>
|
||
<executions>
|
||
<execution>
|
||
<id>enforce-rules</id>
|
||
<goals>
|
||
<goal>enforce</goal>
|
||
</goals>
|
||
<configuration>
|
||
<rules>
|
||
<!-- 推荐升级 Maven 到 3.8+;临时放宽版本以便构建 -->
|
||
<requireMavenVersion>
|
||
<version>[3.6.3,)</version>
|
||
</requireMavenVersion>
|
||
<requireJavaVersion>
|
||
<version>[17,)</version>
|
||
</requireJavaVersion>
|
||
<dependencyConvergence/>
|
||
<!-- 如需严格校验插件版本,可在升级 Maven 后再启用 -->
|
||
</rules>
|
||
</configuration>
|
||
</execution>
|
||
</executions>
|
||
</plugin>
|
||
</plugins>
|
||
</build>
|
||
|
||
</project>
|