Micronaut Framework 3.8.0 Released!
by Sergio Del Amo CaballeroThe Micronaut team is excited to announce the release of Micronaut framework 3.8.0!
This release introduces new features to the Framework. Those features are detailed below.
GraalVM 22.3.0
Micronaut framework 3.8.0 supports the latest GraalVM 22.3.0.
Core
With Micronaut 3.8.0
, you can use @RequestBean
annotations with Records. Before 3.8.0
, you could use a POJO as a controller method parameter and annotate the parameter with @RequestBean
to bind any Bindable value (e.g., HttpRequest
, @PathVariable
, @QueryValue
or @Header
fields).
Suppose you enable CORS from any origin while running your app in localhost (e.g., test or development); the CorsFilter
now returns 403 for non-localhost origins to protect you against drive-by localhost attacks.
Core dependencies
The following core transitive dependencies are updated:
- Netty to
4.1.86.Final
. - Jackson to
2.14
. - Maven Native plugin to
0.9.19
.
Micronaut Data
Micronaut Data adds support for Azure Cosmos and Multi-tenancy. Currently, Micronaut Data supports two multi-tenancy modes, DATASOURCE
and SCHEMA
.
Micronaut Security 3.9.0
Micronaut Security offers:
- Several ahead-of-time optimizations. You can download OpenID Configuration and remote JWKS at build time. Such AOT optimizations offer drastic time-to-first response improvements.
- Proof Key for Code Exchange (PKCE) support. If the Authorization server specifies via
code_challenge_methods
eitherplain
,S256
, or both, Micronaut Security automatically sends a code challenge in the authorization request as specified in PKCE Spec. - To avoid blocking the netty event loop, Micronaut Security eagerly and, in parallel, fetches the OpenID Connect metadata.
Micronaut CLI
Micronaut CLI offers a new command. Type mn create-aws-lambda
, and an interactive prompt will guide you through creating a Micronaut AWS Lambda project.
Micronaut Launch
We continue to improve project templates to get you the best starting point for your Micronaut applications. Both Micronaut Launch and CLI offer several extra features:
Build Plugins
Maven Plugin
Micronaut Maven Plugin improves the start/stop of test resources, let’s the user choose a namespace for the shared test resources service, and it adds a CRaC packaging type to create checkpointed docker images.
Micronaut CRaC
Micronaut CRaC (Coordinated Restore at Checkpoint) adds supports for HikariCP.
Now, it is possible to build a docker image containing a CRaC-enabled JDK and a pre-warmed, checkpointed application with the Micronaut Gradle CRaC Plugin:
$ ./gradlew dockerBuildCrac
and with the Micronaut Maven Plugin:
$ mvn package -Dpackaging=docker-crac
Moreover, you can use Micronaut CRaC in combination with AWS Lambda SnapStart.
CLOUD
Micronaut AWS
Micronaut AWS ships with several features:
- It is now possible to override the endpoint for AWS Services SDK, for example, while testing or developing.
- API Gateway API to ease stage resolution.
- Alexa skill’s request locale resolution.
- A new user agent module.
It updates the following dependencies:
- AWS CDK from
2.41.0
to2.55.1
. - AWS SDK V2 from
2.17.290
to2.19.4
. - AWS SDK V1 from
1.12.320
to1.12.372
. - AWS Lambda SDK
1.2.1
to1.2.2
. - AWS Serverless Java Container Core from
1.8.2
to1.9.1
. - Jetty from
9.4.48.v20220622
to9.4.50.v20221201
.
Micronaut Azure
Micronaut Azure updates to:
- Azure SDK to
1.2.8
. - Azure Functions Java to
3.0.0
. - Azure Cosmos to
4.39.0
.
Micronaut GCP
Micronaut GCP adds new modules to use CloudEvents
, and it adds the necessary configuration to use Google Cloud Events with Micronaut serialization.
It updates to:
- Google Auth Library OAuth 2.0 HTTP from
1.11.0
to1.14.0
. - Google Cloud Core from
2.8.24
to2.9.0
. - Google Cloud PubSub from
1.120.16
to1.122.2
. - Google Secret Manager from
2.3.4
to2.7.0
.
Micronaut Oracle
Micronaut Oracle supports Oracle Cloud Infrastructure (OCI) SDK v3.
Database Migration Tools
Micronaut Liquibase
Micronaut Liquibase updates to Liquibase 4.18.0
.
Reactive Libraries
Micronaut Reactor
Micronaut Reactor updates to Project Reactor 3.5.0
.
Micronaut Test
Micronaut Test updates to:
- JUnit
5.9.1
. - REST-assured
5.3.0
. - Mockito
4.9.0
. - Kotest
5.5.4
.
It adds junit-params
dependency to the Micronaut Test BOM.
Micronaut Test Resources
Micronaut Test Resources adds support for Wait strategies, a method to get the TestResourcesClient
from an ApplicationContext
, and it fixes a potential security issue.
Micronaut OpenAPI
Micronaut OpenAPI 4.8.1
adds many bug fixes, improvements, and new features such as Schema Decorators
, the ability to override the UI templates, better support for server context path, and it updates to swagger 2.2.7
.
Thanks to @altro3 for his continuous support with the Micronaut Open API module.
Micronaut Views
Micronaut Views updates to:
- Thymeleaf
3.1.1.release
. - JTE
2.2.4
. - Handlebars
4.3.1
. - Pebble
3.1.6
.
Micronaut Views JTE supports rendering .kte
(Kotlin) templates.
Micronaut Serialization
Micronaut Serialization adds support for deserialization of timestamps both as timestamp or as a string, and it updates to BSON 4.8.1
.
Micronaut Problem+JSON
Micronaut Problem JSON improve supports for custom ThrowableProblem
in combination with Micronaut Serialization.
Micronaut Spring
Micronaut Spring supports exporting Spring Beans to a Micronaut Application. For example, use a Spring-configured DataSource
with Micronaut Data.
Micronaut Email
Micronaut Email adds Contact:: getNameAddress
, improves the population of the AWS SES sender name, and it updates to Postmark Java Library 1.8.4
.
Micronaut gRPC
Micronaut gRPC updates to gRPC 1.51.1
and protobuf
3.21.12
and several features such as support for connecting on startup.
Micronaut Kafka
Micronaut Kafka offers several improvements around Kafka streams’ metrics.
Micronaut Micrometer
Micronaut Micrometer updates to dropwizards-metrics-core
4.2.13
and gRPC 1.51.
.
Micronaut Object Storage
Micronaut Object Storage adds support for adding metadata as a map of strings, and it supports converting from ObjectStorageEntry
to StreamedFile
and SystemFile
.
Micronaut RabbitMQ
Micronaut RabbitMQ updates to ampqq-client
5.16.0
, supports consumer auto acknowledge mode and options to configure the number of consumers. Moreover, it adds a BOM Module.
Micronaut GraphQL
Micronaut GraphQL updates to GraphQL Java Tools 11.1.2
.
Micronaut Groovy
Micronaut Groovy updates to Hibernate ehcache
5.6.12
.
BOM and Gradle Version Catalog
Several modules publish a BOM (Bill of materials) module and/or use a Gradle Version Catalog: Micronaut Hibernate Validator, Micronaut JMX, Micronaut RabbitMQ, and Micronaut Jackson XML.
Micronaut Guides and Micronaut Serialization
We updated Micronaut Guides to use Micronaut Serialization, which enables serialization/deserialization in Micronaut applications using build time information.
HTTP Server TCK
We wrote an HTTP Server TCK to ensure consistency no matter the runtime you use (Netty, Servlet, Lambda, Azure, GCP).
Community Feedback
We want to thank all the contributors; the community is essential to the Framework’s success. Upgrade your existing applications to this new minor release and report any issues, or give us any feedback!
We are excited about the Micronaut framework’s future in 2023. Happy holidays!