1.1 What’s New?
Micronaut 2.2.0 includes the following changes:
Build Features
Maven Plugin Improvements
The Maven plugin now supports different <packaging>
types:
jar
(default): produces a runnable fat JAR.native-image
: generates a GraalVM native image.docker
: builds a Docker image with the application artifacts (compiled classes, resources, dependencies, etc).docker-native
: builds a Docker image with a GraalVM native image inside.
To package an application, mvn package
is the one-stop shop to produce the desired artifact.
It also supports using mvn deploy
as the only command required to deploy an application that, depending on the <packaging>
:
jar
(default): will deploy the artifact to a remote repository usingorg.apache.maven.plugins:maven-deploy-plugin:deploy
.docker
ordocker-native
: will push the Docker image to the configured Docker registry.
Read more information in the Maven Plugin documentation.
Gradle Plugin Improvements
The Gradle plugin has a new testNativeImage
task that builds the GraalVM Native Image and uses the native application as an embedded server enabling the ability to write native integration tests.
Micronaut Launch Enhancements
Support for Kotlin Gradle Builds
It is now possible to create applications that use build.gradle.kts
instead of build.gradle
using the --build
argument of the CLI:
$ mn create-app demo --build gradle_kotlin && cd demo
$ ./gradlew test
Or via the Micronaut Launch API:
$ curl https://launch.micronaut.io/demo.zip?build=gradle_kotlin -o demo.zip && unzip demo.zip -d demo && cd demo
$ ./gradlew test
Push to Github
It is now possible to create an application with and Micronaut Launch and have it pushed automatically to a repository in your Github account. When generating an application just select the “Push to Github” option.
New Micronaut Modules
MQTT Support
Improving the experience in IoT use cases, Micronaut now has integration with MQTT similar to the integration with Kafka and RabbitMQ. See the Micronaut MQTT documentation to get started.
Micronaut Data R2DBC
A new module that adds support for R2DBC (Reactive Database Connectivity) has been added in preview status. Micronaut Data R2DBC lets you define reactive data repositories using R2DBC that work with any of the supported drivers and include support for GraalVM Native Image.
See the Documentation for Micronaut R2DBC for more information.
Module Upgrades
Micronaut Acme
2.1.0
Micronaut Aws
2.2.3
Micronaut Azure
2.1.0
Micronaut Cache
2.2.0
Micronaut Cassandra
3.1.0
Micronaut Data
2.2.0
Micronaut DiscoveryClient
2.2.0
Micronaut ElasticSearch
2.1.0
Micronaut Flyway
3.1.0
Micronaut Gcp
3.3.0
Micronaut GraphQL
2.2.0
Micronaut Groovy
2.2.0
Micronaut gRPC
2.2.0
Micronaut Hibernate Validator
3.0.0
Micronaut Jmx
2.1.0
Micronaut Kafka
3.1.0
Micronaut Kotlin
2.2.0
Micronaut Liquibase
3.0.0
Micronaut MQTT
1.0.0
Micronaut Micrometer
3.1.0
Micronaut Mongo
3.1.0
Micronaut NatsIo
2.2.0
Micronaut Neo4j
4.1.0
Micronaut OpenApi
2.2.0
Micronaut Oracle Cloud
1.1.0
Micronaut Picocli
3.1.0
Micronaut R2DBC
1.0.0.M2
Micronaut RabbitMQ
2.2.0
Micronaut Reactor
1.1.0
Micronaut Redis
3.1.0
Micronaut Rss
2.2.0
Micronaut Rss
2.3.0
Micronaut RxJava3
1.1.0
Micronaut Security
2.1.4
Micronaut Security
2.2.0
Micronaut Servlet
2.1.1
Micronaut Sql
3.3.1
Micronaut Test
2.2.1
Micronaut Views
2.1.0
Micronaut Xml
2.1.0
Dependency Upgrades
Caffeine
2.8.6
Eclipse Paho v3
1.2.5
Eclipse Paho v5
1.2.5
Elasticsearch
7.9.3
Flyway
7.0.4
gRPC
1.33.1
Hibernate
5.4.23.Final
Kafka
2.6.0
Kotlin Coroutines
1.4.1
Ktor
1.4.1
Liquibase
4.2.0
Lombok
1.18.16
Oracle JDBC Driver
19.8.0.0
Picocli
4.5.2
Protobuf
3.14.0
Reactor
3.4.0
Swagger
2.1.5