目录
[TOC]
maven配置
1 2 3 4 5 6 7 8 9
| <build> <plugins> <plugin> <groupId>org.graalvm.buildtools</groupId> <artifactId>native-maven-plugin</artifactId> </plugin> </plugins> </build>
|
Linux环境安装
软件下载连接
https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.3.3/graalvm-ce-java17-linux-amd64-22.3.3.tar.gz
https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.3.3/native-image-installable-svm-java17-linux-amd64-22.3.3.jar
https://dlcdn.apache.org/maven/maven-3/3.9.8/binaries/apache-maven-3.9.8-bin.tar.gz
环境变量配置
1 2 3 4 5 6 7
| export JAVA_HOME=/usr/local/graalvm-ce-java17-22.3.3 export PATH=$PATH:$JAVA_HOME/bin
export MAVEN_HOME=/usr/local/bin/maven export PATH=${PATH}:${MAVEN_HOME}/bin
|
native安装
1
| gu install --file native-image-installable-svm-java17-linux-amd64-22.3.3.jar
|
打包
1
| mvn clean compile spring-boot:process-aot -Pnative native:build -Pnative native:build
|
SpringBoot3集成native打包可执行文件