2026-03-02 11:47:03 +08:00
|
|
|
|
<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>cn.mayiming</groupId>
|
|
|
|
|
|
<artifactId>javamemories</artifactId>
|
|
|
|
|
|
<version>1.0-SNAPSHOT</version>
|
|
|
|
|
|
<packaging>jar</packaging>
|
|
|
|
|
|
|
|
|
|
|
|
<name>javamemories</name>
|
|
|
|
|
|
<url>http://maven.apache.org</url>
|
|
|
|
|
|
|
|
|
|
|
|
<parent>
|
|
|
|
|
|
<groupId>org.springframework.boot</groupId>
|
|
|
|
|
|
<artifactId>spring-boot-starter-parent</artifactId>
|
|
|
|
|
|
<!-- Spring Boot 3最新稳定版,可在官网确认最新版本 -->
|
|
|
|
|
|
<version>3.2.3</version>
|
|
|
|
|
|
<relativePath/>
|
|
|
|
|
|
</parent>
|
|
|
|
|
|
|
|
|
|
|
|
<properties>
|
|
|
|
|
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
2026-03-02 15:27:52 +08:00
|
|
|
|
<!-- Spring Boot 3 必须用 JDK 17+,否则编译报错 -->
|
|
|
|
|
|
<java.version>22</java.version>
|
2026-03-02 11:47:03 +08:00
|
|
|
|
</properties>
|
|
|
|
|
|
|
|
|
|
|
|
<dependencies>
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>junit</groupId>
|
|
|
|
|
|
<artifactId>junit</artifactId>
|
|
|
|
|
|
<version>3.8.1</version>
|
|
|
|
|
|
<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-data-redis</artifactId>
|
|
|
|
|
|
</dependency>
|
2026-03-02 15:27:52 +08:00
|
|
|
|
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>org.springframework.boot</groupId>
|
|
|
|
|
|
<artifactId>spring-boot-starter-jdbc</artifactId>
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
<!-- 2. MySQL 驱动(适配 Spring Boot 3,运行时依赖) -->
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>com.mysql</groupId>
|
|
|
|
|
|
<artifactId>mysql-connector-j</artifactId>
|
|
|
|
|
|
<scope>runtime</scope>
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>org.springframework.boot</groupId>
|
|
|
|
|
|
<artifactId>spring-boot-starter-test</artifactId>
|
|
|
|
|
|
<scope>test</scope>
|
|
|
|
|
|
<exclusions>
|
|
|
|
|
|
<exclusion>
|
|
|
|
|
|
<groupId>org.junit.vintage</groupId>
|
|
|
|
|
|
<artifactId>junit-vintage-engine</artifactId>
|
|
|
|
|
|
</exclusion>
|
|
|
|
|
|
</exclusions>
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
|
|
|
|
|
|
<dependency>
|
|
|
|
|
|
<groupId>org.mybatis.spring.boot</groupId>
|
|
|
|
|
|
<artifactId>mybatis-spring-boot-starter</artifactId>
|
|
|
|
|
|
<version>3.0.3</version>
|
|
|
|
|
|
</dependency>
|
|
|
|
|
|
|
2026-03-02 11:47:03 +08:00
|
|
|
|
</dependencies>
|
2026-03-02 15:27:52 +08:00
|
|
|
|
|
|
|
|
|
|
<build>
|
|
|
|
|
|
<!-- 必须指定最终生成的 JAR 包名称(可选,但便于识别) -->
|
|
|
|
|
|
<finalName>javamemories</finalName>
|
|
|
|
|
|
|
|
|
|
|
|
<plugins>
|
|
|
|
|
|
<!-- 核心:Spring Boot 打包插件(必须配置,否则无主清单) -->
|
|
|
|
|
|
<plugin>
|
|
|
|
|
|
<groupId>org.springframework.boot</groupId>
|
|
|
|
|
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
|
|
|
|
|
<version>3.2.3</version> <!-- 和你的 Spring Boot 版本一致 -->
|
|
|
|
|
|
<executions>
|
|
|
|
|
|
<!-- 必须添加这个 execution,否则插件不会生效 -->
|
|
|
|
|
|
<execution>
|
|
|
|
|
|
<goals>
|
|
|
|
|
|
<goal>repackage</goal> <!-- 重新打包为可执行 JAR -->
|
|
|
|
|
|
</goals>
|
|
|
|
|
|
</execution>
|
|
|
|
|
|
</executions>
|
|
|
|
|
|
<!-- 可选:手动指定启动类(防止插件找不到) -->
|
|
|
|
|
|
<configuration>
|
|
|
|
|
|
<mainClass>cn.mayiming.App</mainClass> <!-- 替换为你的实际启动类全限定名 -->
|
|
|
|
|
|
</configuration>
|
|
|
|
|
|
</plugin>
|
|
|
|
|
|
</plugins>
|
|
|
|
|
|
</build>
|
2026-03-02 11:47:03 +08:00
|
|
|
|
</project>
|