What is Micronaut?

Vladimír Oraný
Mar 17, 2018 · 2 min read

Micronaut is a new full-stack framework build from the ground by the Grails team officially announced at Greach 2018. It focuses on modularity, minimal memory footprint and startup time which makes it a perfect solution for running on AWS lambda or similar environments. Server written in Java requires less than one second to start with minimal JAR size of 8 MB. Micronaut supports Java, Groovy and Kotlin language.

Key things about Micronaut

The main advantage of Micronaut is that there are no runtime penalty for holding metadata for configuration and dependency injection. You can think about Micronaut as Spring without any runtime reflection. Every information is handled at compile time using Groovy AST transformation or AST processors for Java and Kotlin. Micronaut uses internal dependency injection module inspired by Spring which leverages the official JSR-330 Context and Dependency Injection annotations.

Micronaut code looks very similar to Spring Boot with Spring Cloud enabled. You can write HTTP servers and HTTP clients with seamless load balancing. There is out-of-box support for service discovery, Hystrix, trace logging, caching, fault tolerance and circuit breaker pattern. Reactive Streams support is integral part of the framework so your controllers and clients can use for example RxJava 2 objects for input and output such as Single<MyObject>.

Controller Example

Client Example

Fallback Client Example

Similar to Spring Boot you can declare your own auto-configurable beans using @Requires annotation. It also shares the configuration properties with Spring Boot. You can even use SPRING_APPLICATION_JSON environment property for backend compatibility. You can use environment-specific properties for example application-aws.yml for deployment to AWS.

Micronaut shares some of the parts with Grails — you will be able to use for example GORM from within your Micronaut microservice.

Micronaut is not available to public yet. The release is planned in Q2 2018 which means it will be probably released at Gr8Conf EU, which will also host talks dedicated to this new framework. Companies interested to try Micronaut may ask OCI for beta access.

You can see more details about Micronaut in following slides by Álvaro Sánchez-Mariscal:

Edit: First milestone of Micronaut has been released at Gr8Conf EU as expected. Visit the download section to get started. Preferred option is to use SDKMAN!:

The documentation is already very comprehensive:

There are also several guides available already:

HackerNoon.com

#BlackLivesMatter

Sign up for Get Better Tech Emails via HackerNoon.com

By HackerNoon.com

how hackers start their afternoons. the real shit is on hackernoon.com. Take a look

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy practices.

Check your inbox
Medium sent you an email at to complete your subscription.

Vladimír Oraný

Written by

Full Stack Developer and Test Facilitator at @agorapulse

HackerNoon.com

Elijah McClain, George Floyd, Eric Garner, Breonna Taylor, Ahmaud Arbery, Michael Brown, Oscar Grant, Atatiana Jefferson, Tamir Rice, Bettie Jones, Botham Jean

Vladimír Oraný

Written by

Full Stack Developer and Test Facilitator at @agorapulse

HackerNoon.com

Elijah McClain, George Floyd, Eric Garner, Breonna Taylor, Ahmaud Arbery, Michael Brown, Oscar Grant, Atatiana Jefferson, Tamir Rice, Bettie Jones, Botham Jean

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch

Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore

Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store