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 ❤️
  • Наука та технологія

КОМЕНТАРІ • 31

  • @rafinhaLQ
    @rafinhaLQ 2 місяці тому

    Amazing presentation! Thanks!

  • @TheTallMan67
    @TheTallMan67 2 місяці тому

    Exciting. Thanks Dan

  • @orestis131
    @orestis131 2 місяці тому

    Nice presentation! Thanks

  • @aldosilva6
    @aldosilva6 2 місяці тому

    Very nice presentation Dan. I didn't know that I could customize the JVM.

  • @AlexTilkin
    @AlexTilkin Місяць тому

    Good video. Thank you, Dan

  • @rabah4306
    @rabah4306 2 місяці тому

    Hello Dan thanks for your videos they are awesome!!!
    I have a question, what is your opinion on Monorepo?

  • @remsbd
    @remsbd Місяць тому

    Thanks for your video ! but i have an issue, 'gu' tool was not found...

  • @bartomiejdziadosz8616
    @bartomiejdziadosz8616 Місяць тому

    Hello Dan, any video about graalvm + aws lambda?

  • @dd1.d
    @dd1.d 2 місяці тому

    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

  • @gamires
    @gamires 2 місяці тому +1

    @DanVega It is possible to build a native image from Windows to put in a docker image?

    • @DanVega
      @DanVega  2 місяці тому +1

      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

    • @gamires
      @gamires 2 місяці тому

      @@DanVega Here is the answer "2.2. Building a Native Image Using Buildpacks"
      I run your example just well.
      Thank your very much!

  • @RahulSingh-cl3wm
    @RahulSingh-cl3wm 2 місяці тому +2

    Can you please cover limitations also?

    • @DanVega
      @DanVega  2 місяці тому

      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.

    • @RahulSingh-cl3wm
      @RahulSingh-cl3wm 2 місяці тому

      @@DanVega in context with spring what all dynamic features we cannot use.

  • @007arek
    @007arek 2 місяці тому +1

    Hi Dan, are you familiar with JavaFX? I believe JavaFX could be great for native images.
    Why do you use legacy annotation like ShellMethod?

    • @mrkostya008
      @mrkostya008 2 місяці тому

      Did you just get out of uni for thinking that

    • @007arek
      @007arek 2 місяці тому

      @@mrkostya008 no, why do you think that?

  • @terribleprogrammer
    @terribleprogrammer 2 місяці тому +1

    I am facing issues with Kerberos based apps. We use gss native. For some unknown reasons Kerberos based calls are failing. 😢

    • @DanVega
      @DanVega  2 місяці тому

      Sorry to hear that... I don't have any experience with Kerberos but you could always open up an issue on GitHub

  • @curio78
    @curio78 7 днів тому

    why is the native image still so big? 6 mb for one line code to say hello.

  • @praveens2272
    @praveens2272 2 місяці тому +1

    Does anyone using this in production with containerising the application.

    • @AbdurRahmanAcademy
      @AbdurRahmanAcademy 2 місяці тому +2

      Not in production but we tried locally and there are many dependencies which still not fully supported

    • @andytael
      @andytael 2 місяці тому +2

      We do use it for production, actually a CLI :-)

    • @DanVega
      @DanVega  2 місяці тому +2

      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

  • @OmarSoftwareDev
    @OmarSoftwareDev 19 днів тому

    Tried not working for me, something related with VS studio. This is is not as straightforward it seems

  • @andytael
    @andytael 2 місяці тому +2

    Why are you using the wrapper, this works just fine for me:
    mvn clean -Pnative native:compile

    • @DanVega
      @DanVega  2 місяці тому +5

      Not everyone has maven installed locally so thats why I use the mvn wrapper in demos

  • @mwigojonathanmark1683
    @mwigojonathanmark1683 7 днів тому

    Spring Security breaks the native image execution