DEV Community

Cover image for ⏩ Going native with Spring Boot on Mac M1
adriens for opt-nc

Posted on β€’ Edited on

3

⏩ Going native with Spring Boot on Mac M1

πŸ‘‰ Intro

I recently saw a great Spring blog post about Building Native Images with GraalVM and Spring Native on Apple's M1 Architecture.

In the same time we are investigating on porting some of our (innovation dedicated) existing Spring Boot based APIs to Spring Native, see related content :

As one of our developers works on an Mac M1, we wanted to give it a try to see what would happen.

This short blog post is about that short experimentation.

🎞️ Build & Run : 2' speedrun

Finally we could enjoy the full and smooth cli based experience :

  1. Setup Java runtime with GraalVM 22.0.0 with sdkman
  2. Build & Install native image (and see resources used : time & memory)
  3. Boot the API (0.4s.)
  4. Perform a first REST query (0.007 s.) with httpie
  5. Perform a second REST query (0.003 s.)

Let the show begin :

🍏 More about Apple M1

You can get a full intro/deep dive on Apple M1 Ultra architecture thanks to this great Computerphile episode :

πŸ”– Resources

Sentry image

See why 4M developers consider Sentry, β€œnot bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (2)

Collapse
 
adriens profile image
adriens β€’

@dougniel :

Collapse
 
adriens profile image
adriens β€’

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

πŸ‘‹ Kindness is contagious

Please leave a ❀️ or a friendly comment on this post if you found it helpful!

Okay