Getting started with Spring Boot AOT + GraalVM Native Images
Вставка
- Опубліковано 11 бер 2024
- In this tutorial you will learn the what, why and how of building native images in Spring Boot with GraalVM. Ahead-of-Time (AoT) compilation is a prerequisite for building native images with GraalVM. You will learn where this makes sense and then you will build out 2 simple Spring Boot Applications and build a native image from them.
🔗Resources & Links mentioned in this video:
👋🏻Connect with me:
Website: www.danvega.dev
Twitter: / therealdanvega
Github: github.com/danvega
LinkedIn: / danvega
Newsletter: www.danvega.dev/newsletter
SUBSCRIBE TO MY CHANNEL: bit.ly/2re4GH0 ❤️ - Наука та технологія
Amazing presentation! Thanks!
Exciting. Thanks Dan
Nice presentation! Thanks
Very nice presentation Dan. I didn't know that I could customize the JVM.
Good video. Thank you, Dan
Hello Dan thanks for your videos they are awesome!!!
I have a question, what is your opinion on Monorepo?
Thanks for your video ! but i have an issue, 'gu' tool was not found...
Hello Dan, any video about graalvm + aws lambda?
I’m not sure if anyone else has encountered this issue. When I have circular dependencies and use the @Lazy annotation to resolve them, the resulting native image fails to run
@DanVega It is possible to build a native image from Windows to put in a docker image?
I don't have any experience with this but you can check out the docs
docs.spring.io/spring-boot/docs/current/reference/html/native-image.html#native-image.developing-your-first-application.native-build-tools.prerequisites.windows
@@DanVega Here is the answer "2.2. Building a Native Image Using Buildpacks"
I run your example just well.
Thank your very much!
Can you please cover limitations also?
What limitations? I pointed out that there are tradeoffs, one being time to build the native image and the other being you need to tell the compiler about anything dynamic that you're doing.
@@DanVega in context with spring what all dynamic features we cannot use.
Hi Dan, are you familiar with JavaFX? I believe JavaFX could be great for native images.
Why do you use legacy annotation like ShellMethod?
Did you just get out of uni for thinking that
@@mrkostya008 no, why do you think that?
I am facing issues with Kerberos based apps. We use gss native. For some unknown reasons Kerberos based calls are failing. 😢
Sorry to hear that... I don't have any experience with Kerberos but you could always open up an issue on GitHub
why is the native image still so big? 6 mb for one line code to say hello.
Does anyone using this in production with containerising the application.
Not in production but we tried locally and there are many dependencies which still not fully supported
We do use it for production, actually a CLI :-)
Yes this is being used in production. You can switch to the native profile and build a container
docs.spring.io/spring-boot/docs/current/reference/html/native-image.html
Tried not working for me, something related with VS studio. This is is not as straightforward it seems
Why are you using the wrapper, this works just fine for me:
mvn clean -Pnative native:compile
Not everyone has maven installed locally so thats why I use the mvn wrapper in demos
Spring Security breaks the native image execution