These tutorials target Micronaut Framework 3. Read, Guides for Micronaut Framework 4.

Micronaut 3 Guides

Micronaut 3 Guides

May 24, 2023
How to use Kubernetes service discovery and distributed configuration in a Micronaut application
May 23, 2023
Service discovery and distributed configuration in a Micronaut application with Amazon Elastic Kubernetes Service (EKS)
May 22, 2023
Service discovery and distributed configuration in a Micronaut application with Oracle Cloud Container Engine for Kubernetes (OKE)
Apr 12, 2023
Learn how to create a Micronaut application and secure it with an Authorization Server provided by Keycloak.

Getting Started

Learn how to create a Hello World Micronaut application with a controller and a functional test.
Tags: junit
Learn how to utilize @Configuration and @ConfigurationBuilder annotations to effectively configure declared properties.
Learn how to configure Cross-Origin Resource Sharing (CORS) in a Micronaut application.
Constructor, Field, and method parameter injection.
Tags: junit, di
Learn how to expose a health endpoint for your Micronaut application.
Tags: health
Learn how to use Micronaut low-level HTTP Client. Simplify your code with the declarative HTTP client.
Delegate run and build actions to Gradle and Maven when working with IntelliJ IDEA
Learn about the available scopes: Singleton, Prototype, Request, Refreshable, Context...
Tags: di

Beyond the Basics

Respond to a localized version of your application with LocalizedMessageSource.
Tags: i18n
How to create a custom constraint annotation for validation in your Micronaut application
Learn about error handling in the Micronaut framework.
Learn how to schedule periodic tasks inside your Micronaut microservices.
Tags: job, scheduled

Distribution

Learn how to generate an executable JAR of a Micronaut application with Maven or Gradle.
Learn how to create a Hello World Micronaut GraalVM application.
Tags: graal
Micronaut build plugins offer several ways to build Docker images - JAR, GraalVM native executable, CRaC

Schema Migration

Learn how to use Flyway to manage your schema migrations
Learn how to use the Liquibase to manage your schema migrations.

Data Access

Learn how to access a database with MyBatis using the Micronaut framework.
Learn how to access a database with Micronaut JDBC repositories.
Learn how to access a MongoDB database asynchronously with Micronaut Data.
Learn how to access a MongoDB database with Micronaut Data and the MongoDB Sync driver.
Learn how to access a database with Micronaut R2DBC repositories.
Learn how to use DynamoDB as your persistence solution in a Micronaut Application.
Learn how to use Hibernate Reactive with the Micronaut Framework.
Learn how to a leverage Java records for immutable configuration, Micronaut Data Mapped Entities and Projection DTOs
Tags: record
Learn how to access a database with JPA and Hibernate using the Micronaut framework.
Learn how to use MicroStream as a high-performance persistence layer.
Learn how to use a non-blocking reactive streams MongoDB client with a Micronaut application
Tags: mongodb
Learn how to use a blocking MongoClient with a Micronaut application
Tags: mongodb
Learn how the Micronaut framework helps you implement multitenancy in a set of microservices.
This guide shows how to use Micronaut Data from a Spring Boot application.

Cache

Learn how to use Micronaut caching annotations

Testing

Learn how to use Micronaut Test REST-Assured to test the REST API of your Micronaut application.

Micronaut Security

Learn how to generate a JSON Web Key (JWK) with a Micronaut CLI (Command Line interface) application
Tags: jwk, graalvm
Learn how to create a LDAP and a database authentication provider in a Micronaut Application.
Learn how to secure a Micronaut application using an API Key.
Learn how to secure a Micronaut application using 'Basic' HTTP Authentication Scheme.
Learn how to secure a Micronaut application using JWT (JSON Web Token) Authentication.
Learn how to secure a Micronaut application using JWT (JSON Web Token) based authentication where the JWT tokens are transported via Cookies.
Learn how to expose a keys endpoint with primary and secondary JSON Web Key (JWK)
Tags: jwk
Learn how to secure a Micronaut application using Session based authentication.
Learn how to implement mutual authentication using SSL and X.509 certificates.
Tags: security, x509
Learn how to leverage token propagation in the Micronaut framework to simplify your code while keeping your microservices secure.

Authorization Code

Learn how to create a Micronaut application and secure it with an Authorization Server provided by Auth0.
Learn how to create a Micronaut application and secure it with an Authorization Server provided by Cognito.
Learn how to create a Micronaut application and secure it with an Authorization Server provided by Github. Learn how to write your own Authentication Mapper.
Learn how to create a Micronaut application and secure it with an Authorization Server provided by Keycloak.
Learn how to create a Micronaut application and authenticate with LinkedIn.
Learn how to create a Micronaut application and secure it with Google and provide authentication with OpenID Connect
Learn how to create a Micronaut application and secure it with an Authorization Server provided by Okta.

Client Credentials

Learn how to use Client Credentials Flow between Micronaut microservices with an Authorization Server provided by Auth0.
Learn how to use Client Credentials Flow between Micronaut microservices with an Authorization Server provided by Amazon Cognito.

Secrets Manager

Learn how to load your secrets from AWS Secrets Manager in your Micronaut application
Tags: aws, secrets
Learn how to create an AWS Lambda function with the Micronaut framework to rotate a secret stored in AWS Secrets Manager
Learn how to create secrets in Azure Key Vault and easily access them in a Micronaut application.
Learn how to create secrets in Oracle Cloud Vault and easily access them in a Micronaut application.

Patterns

Learn how to use a Composite Pattern if you have multiple beans of particular type

Email

Learn how to send emails with Amazon SES from a Micronaut application
Tags: email, aws, ses
Learn how to send emails with SendGrid from a Micronaut application
Learn how to send an email with Oracle Cloud Infrastructure (OCI) Email Delivery using the Micronaut framework.
Tags: oracle, cloud

Kotlin

Take a tour of the extension functions in the Micronaut framework and learn to write your own

Messaging

Learn how to connect JMS Application to an AWS SQS Queue
Tags: jms, messaging, aws
Use Kafka to communicate between your Micronaut applications.
Learn how to use Mosquitto as an MQTT broker, create a Micronaut CLI application and publish an MQTT topic, and subscribe to the MQTT topic in a different Micronaut Messaging application.
Tags: messaging
Use RabbitMQ to communicate between your Micronaut applications.
Use RabbitMQ RPC to use request-reply pattern in your Micronaut applications.

API

Expose endpoints using JAX-RS annotations in a Micronaut application
Write an application using Spring Boot annotations and compute it into a Micronaut application at compilation time.
Build a chat application by exposing a WebSocket Server with the Micronaut Framework
Tags: websocket

OpenAPI

Learn how to generate a Declarative Micronaut Client API from an OpenAPI definition and how to use it in your application
Learn how to write an OpenAPI definition, use it to generate a server template for a Micronaut application, and get it all to work

Turbo

This guide shows how to build with the Micronaut Framework a chat application such as the Rails application demonstrated in the Hotwire announcement screencast.
Run the Turbo Native Demo with a Micronaut application as the backend.

GraphQL

Learn how to use Micronaut GraphQL.
Tags: graphql
Build a TODO application with Micronaut GraphQL.

Metrics

Learn how to collect standard and custom metrics with the Micronaut framework.
Tags: metrics
Learn how to collect standard and custom metrics with the Micronaut framework and monitor them on Amazon Cloudwatch.
Learn how to collect standard and custom metrics with the Micronaut framework and monitor them on Oracle Cloud.

Distributed Tracing

Use Google Cloud Trace to investigate the behavior of your Micronaut applications.
Use Oracle Cloud to investigate the behavior of your Micronaut applications.
Use Jaeger distributed tracing to investigate the behaviour of your Micronaut applications.
Use Jaeger distributed tracing to investigate the behavior of your Micronaut applications.
Use AWS X-Ray distributed tracing to investigate the behavior of your Micronaut applications.
Use Zipkin distributed tracing to investigate the behaviour of your Micronaut applications.
Use Zipkin distributed tracing to investigate the behavior of your Micronaut applications.

Service Discovery

How to use Kubernetes service discovery and distributed configuration in a Micronaut application
Service discovery and distributed configuration in a Micronaut application with Amazon Elastic Kubernetes Service (EKS)
Service discovery and distributed configuration in a Micronaut application with Oracle Cloud Container Engine for Kubernetes (OKE)
Use Consul service discovery to expose your Micronaut applications.
Use Netflix Eureka service discovery to expose your Micronaut applications.

Distributed Configuration

Learn how to use AWS Parameter for Configuration Discovery in a Micronaut application.
How to use Kubernetes service discovery and distributed configuration in a Micronaut application
Service discovery and distributed configuration in a Micronaut application with Amazon Elastic Kubernetes Service (EKS)
Service discovery and distributed configuration in a Micronaut application with Oracle Cloud Container Engine for Kubernetes (OKE)

Common Tasks

Expose the exact version of code that your application is running.
Tags: git
Learn how to download an Excel file with the Micronaut framework and Spreadsheet Builder library.

Object Storage

Learn how to upload and retrieve files from Amazon S3 using the Micronaut Object Storage API
Learn how to upload and retrieve files from Google Cloud Storage using the Micronaut Object Storage API
Learn how to upload and retrieve files from Oracle Cloud Infrastructure (OCI) Object Storage using the Micronaut Object Storage API

AWS

Learn how to use AWS Parameter for Configuration Discovery in a Micronaut application.
Learn how to load your secrets from AWS Secrets Manager in your Micronaut application
Tags: aws, secrets
Learn how easy is to deploy a Micronaut Application to Elastic Beanstalk.
Service discovery and distributed configuration in a Micronaut application with Amazon Elastic Kubernetes Service (EKS)
Learn how to collect standard and custom metrics with the Micronaut framework and monitor them on Amazon Cloudwatch.
Learn how to upload and retrieve files from Amazon S3 using the Micronaut Object Storage API

AWS Lambda

Learn how to a scheduled expression with Event Bridge trigger to execute a Micronaut AWS Lambda every 5 minutes
Learn how to generate thumbnails for images uploaded to an S3 bucket with AWS Lambda and the Micronaut framework
Tags: lambda, s3, aws
Learn how to create an AWS Lambda function with the Micronaut framework to rotate a secret stored in AWS Secrets Manager
Learn how to distribute a Micronaut Java application built as a GraalVM Native executable to AWS Lambda Custom Runtime
Learn how to distribute a Micronaut application to AWS Lambda 11 Runtime
Tags: lambda, aws
Learn how to distribute a serverless Micronaut function to AWS Lambda 11 Runtime
Learn how to distribute a Micronaut function built as a GraalVM Native executable to AWS Lambda Custom Runtime

Microsoft Azure

Learn how to deploy a Micronaut application to Microsoft Azure.
Tags: azure, cloud
Learn how to create an Azure HTTP Function with the Micronaut framework
Learn how to connect a Micronaut Data JDBC application to a Microsoft Azure Database for MySQL
Learn how to create secrets in Azure Key Vault and easily access them in a Micronaut application.

Google Cloud

Use Google Cloud Trace to investigate the behavior of your Micronaut applications.
Deploy a Docker Image containing a CRaC enabled JDK and a pre-warmed, checkpointed application to Google Cloud Run - a fully managed serverless platform for containerized applications.
Tags: cloudrun, gcp
Learn how to deploy a Micronaut application to Google App Engine Java Flexible Environment
Tags: appengine, gcp
Deploy a Micronaut application to Google Cloud Compute instance.
Deploy a Micronaut application as an HTTP Function to Google Cloud Functions - a scalable pay-as-you-go functions-as-a-service (FaaS) to run your code with zero server management.
Deploy a Micronaut application to Google Cloud Run - a fully managed serverless platform for containerized applications.
Tags: gcp, cloudrun
Deploy a GraalVM Native Executable of a Micronaut application to Google Cloud Run - a fully managed serverless platform for containerized applications.
Tags: cloudrun, gcp
Learn how to upload and retrieve files from Google Cloud Storage using the Micronaut Object Storage API

Oracle Cloud

Learn how to deploy a MySQL Micronaut Database Application to Oracle Cloud.
Learn how to create a secured Micronaut application and authenticate with OpenID Connect in Oracle Cloud.
Learn how to create secrets in Oracle Cloud Vault and easily access them in a Micronaut application.
Use Oracle Cloud to investigate the behavior of your Micronaut applications.
Service discovery and distributed configuration in a Micronaut application with Oracle Cloud Container Engine for Kubernetes (OKE)
Learn how to collect standard and custom metrics with the Micronaut framework and monitor them on Oracle Cloud.
Learn how to upload and retrieve files from Oracle Cloud Infrastructure (OCI) Object Storage using the Micronaut Object Storage API
Learn how to access an Oracle Autonomous Database using the Micronaut framework.
Learn how to deploy a Micronaut application to Oracle Cloud.
Tags: oracle, cloud
Use Oracle Cloud Streaming to communicate between your Micronaut applications.
Learn how to send an email with Oracle Cloud Infrastructure (OCI) Email Delivery using the Micronaut framework.
Tags: oracle, cloud
Learn how to deploy a Micronaut Function (Serverless) application to Oracle Cloud.
Learn how to deploy a Micronaut HTTP API Gateway Function (Serverless) application to Oracle Cloud.

Kubernetes

How to use Kubernetes service discovery and distributed configuration in a Micronaut application
Service discovery and distributed configuration in a Micronaut application with Amazon Elastic Kubernetes Service (EKS)
Service discovery and distributed configuration in a Micronaut application with Oracle Cloud Container Engine for Kubernetes (OKE)

Spring Boot to Micronaut Framework

This guide shows how to use Micronaut Data from a Spring Boot application.
This guide shows compares the Application Class of a Spring Boot application vs a Micronaut Framework application.
This guide compares using Spring's UriComponentsBuilder vs Micronaut Framework's UriBuilder.