1
This commit is contained in:
24
pom.xml
24
pom.xml
@@ -112,21 +112,27 @@
|
|||||||
|
|
||||||
|
|
||||||
<!-- Maven 插件 -->
|
<!-- Maven 插件 -->
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
|
<!-- 核心配置:必须启用 spring-boot-maven-plugin -->
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
<version>3.8.1</version>
|
<version>3.1.5</version> <!-- 与你的Spring Boot版本一致 -->
|
||||||
<configuration>
|
<configuration>
|
||||||
<release>17</release>
|
<!-- 显式指定主类(可选,建议添加) -->
|
||||||
<compilerArgs>
|
<mainClass>cn.van.Application</mainClass>
|
||||||
<arg>--enable-preview</arg>
|
|
||||||
</compilerArgs>
|
|
||||||
</configuration>
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<goals>
|
||||||
|
<goal>repackage</goal> <!-- 关键:生成可执行JAR -->
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
<repositories>
|
<repositories>
|
||||||
<repository>
|
<repository>
|
||||||
|
|||||||
Reference in New Issue
Block a user