recursive.codes


The Personal Blog of Todd Sharp

Announcing Micronaut 2.1

Posted By: Todd Sharp on 10/2/2020 5:53 GMT
Tagged: Cloud, Java, Open Source

I’m happy to announce the release of Micronaut 2.1, which brings a handful of new features, bug fixes and upgrades to existing features. Let’s take a quick look at some of the highlights.

Core Features

There are several exciting core features that have been added to the framework.

Introspections for JDK 14 Records

It is now possible to define bean introspections on JDK 14+ record types (note these currently require the --enable–preview flag to the compiler and JVM).

Default Environment

Micronaut 2.1 introduces the concept of a default environment. One or more default environments can be set and they will apply if no other environments are explicitly specified. See the environments documentation for information on how to use this new feature.

@Order Annotation

The Order annotation has been added to support supplying bean order for factory methods or for those who prefer the use of annotations over Ordered interface.

Kotlin 1.4

Micronaut now ships with Kotlin 1.4 for those users using Kotlin.

Build Features

New Gradle Plugin

A new Gradle plugin is available that provides a more expressive way to define a Micronaut application and includes awesome new features for GraalVM Native Image and Docker. The minimum required build to build a Micronaut application is now:

Building a Native Image is then as simple as:

Building a Docker image using GraalVM Native Image can be done with:

To push a native image to a Docker registry

Stay tuned for a blog post that goes into more details about the Gradle Plugin coming very soon!

Web Features

Highlights include a new API for binding declarative HTTP client methods to an HTTP request, query parameter support for websockets, and cookie retrieval from HttpResponse.

Cloud Features

As usual, cloud support is a top priority of Micronaut, and this release brings some exciting integrations for Oracle Cloud as well as some enhancements for other cloud vendors.

Support for Oracle Cloud SDK

A new GraalVM Native Image compatible module for Oracle Cloud SDK has been added allowing you to use any part of the Oracle Cloud SDK with Native Image and also enhancing the SDK with RxJava 2 support. See this blog post for more information.

Support for Oracle Function

Support has been added for building Oracle Functions deployable to Oracle Cloud including the ability to compute the functions in native images using GraalVM. See this blog post for more information.

Launch Updated for Oracle Cloud SDK and Oracle Functions

These Oracle Cloud features are also now available in Micronaut Launch so you can easily bootstrap a new application that uses them.

Simply search for “Oracle” in the Features dialog:

Many modules and dependencies have received upgrades in 2.1. To read about these and all of the other features that were not mentioned here, or for more information about anything above, check out the release notes. As always, your feedback is encouraged and appreciated.

Image by Gerd Altmann from Pixabay



Related Posts

IaC in the Cloud: Installing Terraform and Running Your First Script

IaC in the Cloud: Installing Terraform and Running Your First Script

In our last post, we took a high-level look at the basics of Terraform for developers. Hopefully you’ve read that (or are already familiar with Terraform...

 Infrastructure as Code in the Cloud: Introduction to Terraform for Developers

Infrastructure as Code in the Cloud: Introduction to Terraform for Developers

Over the next few blog posts, I’d like to give my developer friends a “stratospheric” view of Terraform to introduce the tool and give some basic understanding...

Message Driven Microservices & Monoliths with Micronaut - Part 4: Using RabbitMQ for Messaging

Message Driven Microservices & Monoliths with Micronaut - Part 4: Using RabbitMQ for Messaging

Previously, we looked in-depth at messaging for your microservice and monoliths by using an e-commerce example. We first set up a Kafka broker and created...

Note: Comments are currently closed on this blog. Disqus is simply too bloated to justify its use with the low volume of comments on this blog. Please visit my contact page if you have something to say!