spring-boot-maven-plugin:3.2.0:process-aot

q35jwt9p  于 12个月前  发布在  Maven
关注(0)|答案(1)|浏览(196)

run命令:mvn -Pnative:compile但在这里执行spring-boot-maven-plugin:3.2.0:process-aot卡住了工作后试试Ctrl+C
https://docs.spring.io/spring-boot/docs/current/reference/html/native-image.html#native-image.whats-next
pom.xml:

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>3.2.0</version>
    <relativePath/>
</parent>

<dependencies>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter</artifactId>
    </dependency>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
    </dependency>

</dependencies>

<profiles>
    <profile>
        <id>native</id>
        <build>
            <plugins>
                <plugin>
                    <groupId>org.graalvm.buildtools</groupId>
                    <artifactId>native-maven-plugin</artifactId>
                    <configuration>
                        <imageName>${project.artifactId}</imageName>
                        <mainClass>com.example.techtest.TechTestApplication</mainClass>
                        <skipNativeTests>true</skipNativeTests>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-maven-plugin</artifactId>
                </plugin>
            </plugins>
        </build>
    </profile>
</profiles>

字符串
执行信息:

[INFO] --- spring-boot-maven-plugin:3.2.0:process-aot (process-aot) @ tech-spring-boot- 
starter ---
c.example.techtest.TechTestApplication   : Starting TechTestApplication using Java 
21.0.1 with PID 20128 (D:\WorkSpace\project\tech-test\target\classes started by 86188 in 
D:\WorkSpace\project\tech-test)
2023-12-28T16:28:51.406+08:00  INFO 20128 --- [           main] 
c.example.techtest.TechTestApplication   : The following 1 profile is active: "native"

juzqafwq

juzqafwq1#

spring.main.keep-alive将配置更改为false is work。
此问题已在springboot 3.2.1中修复

相关问题