随笔分类 -  GraalVM

摘要:Spring Boot支持对AOT模式的启动、测试 1、构建 mvn -Pnative native:compile 或 mvn -Pnative spring-boot:build-image 1、启用AOT的方式启动app java -Dspring.aot.enabled=true -jar 阅读全文
posted @ 2024-06-05 15:50 漠孤烟 阅读(351) 评论(0) 推荐(0) 编辑
摘要:代码: Field[] fields = YourClass.class.getDeclaredFields(); Run On JVM 可正常获取该类所有成员变量 Compile with GraalVM to Native Image 代码不报错,但fields数组长度为0 解决办法 实现Run 阅读全文
posted @ 2024-06-03 18:11 漠孤烟 阅读(69) 评论(0) 推荐(0) 编辑
摘要:日志示例 [INFO] native-maven-plugin:0.9.28:compile (default-cli) @ my-app [INFO] Found GraalVM installation from GRAALVM_HOME variable. [INFO] [graalvm re 阅读全文
posted @ 2024-06-03 15:39 漠孤烟 阅读(192) 评论(0) 推荐(0) 编辑
摘要:Windows下GraalVM要把jar编译成二进程可执行文件,需要依赖MSVC环境。 Windows下想要MSVC环境但又不想安装笨重的Visual Studio的10几个G容量,可以用以下方法安装最小集,只需几百兆: 1、使用PortableBuildTools来下载MSVC最小集 https: 阅读全文
posted @ 2023-10-18 22:30 漠孤烟 阅读(381) 评论(0) 推荐(0) 编辑
摘要:使用GraalVM对spring boot工程进行native编译: 系统:Centos JDK:GraalVM JDK 21 报错: If you are unable to resolve this problem, please file an issue with the error rep 阅读全文
posted @ 2023-10-18 19:53 漠孤烟 阅读(2093) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示