A modern, JVM-based, full-stack framework for building modular, easily testable microservice applications.

Choose a language

Java Logo Java

Groovy Logo Groovy

Kotlin Logo Kotlin

Micronaut - Minimal memory footprint

Fast Startup Time   —   Low Memory Consumption

Reflection-based IoC frameworks load and cache reflection data for every single field, method, and constructor in your code, whereas with Micronaut, your application startup time and memory consumption are not bound to the size of your codebase.

Micronaut startup time

Non-blocking HTTP server built on Netty

With a smooth learning curve, Micronaut's HTTP server makes it as easy as possible to expose APIs that can be consumed by HTTP clients.

            
import io.micronaut.http.annotation.*;

@Controller("/hello") 
public class HelloController {

    @Get("/") 
    public String index() {
        return "Hello World"; 
    }
}

          

Declarative, Reactive, Compile-Time HTTP Client

Declaratively build reactive HTTP clients, which are implemented at compile-time, reducing memory consumption.

            
import io.micronaut.http.annotation.Get;
import io.micronaut.http.client.Client;
import io.reactivex.Single;

@Client("/hello") 
public interface HelloClient {

    @Get("/") 
    Single hello(); 
}

          

Fast and Easy Testing

Easily spin up servers and clients in your unit tests, and run them instantaneously.

        
import io.micronaut.runtime.server.EmbeddedServer
import spock.lang.*

class HelloClientSpec extends Specification {
    @Shared 
    @AutoCleanup 
    EmbeddedServer embeddedServer = 
        ApplicationContext.run(EmbeddedServer) 

    @Shared 
    HelloClient client = embeddedServer
        .applicationContext
        .getBean(HelloClient) 

    void "test hello world response"() {
        expect:
        client.hello().blockingGet() == "Hello World" 
    }
}

      

Build Fully Reactive and Non-Blocking Apps

Micronaut supports any framework that implements Reactive Streams, including RxJava, and Reactor.

            
@Client( id = "person-service" ) 
public interface PersonClient {                        
    public Single<Person> 
        save(@Body Single<Person>person) 
}
          

Efficient Compile-Time Dependency Injection and AOP

Micronaut provides a simple compile-time aspect-oriented programming API that does not use reflection.

            
@Scheduled(fixedRate = "5m")
@Retry(attempts='5')
void everyFiveMinutes() {
    messageService.sendMessage("Hello World");
}
          

Natively Cloud Native

Micronaut's Cloud support is built right in, including support for common discovery services, distributed tracing tools, and cloud runtimes.

Micronaut Cloud Services Integration

Designed for Building Resilient Microservices

Distributed environments require planning for failure. Micronaut's built-in support for retry, circuit breaker, and fallbacks help you plan.

            
import io.micronaut.retry.annotation.*

@CircuitBreaker(reset = "30s")
public List findBooks() {
    ...
    ..
}

          

Ready to develop serverless applications

Micronaut's low overhead compile-time DI and AOP make it perfect for writing functions for serverless environments like AWS Lambda.

            
@Field
@Inject
HelloService helloService

Message hello(Person person) {
    helloService.hello(person)
}

          

Fast Data-Access Configuration

Micronaut provides sensible defaults that automatically configure your favourite data access toolkit and APIs to make it easy to write your own integrations.

Micronaut Fast Data Access Configuration