2

有人使用 GraalVM 编译 SpringBoot 程序了吗?

 1 year ago
source link: https://www.v2ex.com/t/936538
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

V2EX  ›  Java

有人使用 GraalVM 编译 SpringBoot 程序了吗?

  ThinkStu · 17 小时 19 分钟前 · 1674 次点击
OP 从去年开始关注 GraalVM 的发展,前天开始想把我之前写的一些小应用转为可执行的二进制文件,原因当然是服务器的内存不够用。

实测在 MacOS 系统上普通 SpringBoot 程序大约占用内存 200MB ,转为可执行文件后内存占用大约 30MB 。

现在最大的问题是,GraalVM + image-native 这一套东西不支持跨端编译!也就是在 Mac 系统上编译出来的程序无法再 Linux 上直接运行。op 曾考虑过将代码转移到 Linux 服务器上进行编译,结果因为许多依赖问题,一直报错,前前后后折腾了两三天也没能想到好方法。🥲

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK