DEV Community

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

Posted on • Updated on

⏩ 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

Top comments (2)

Collapse
 
adriens profile image
adriens

@dougniel :

Collapse
 
adriens profile image
adriens