3

Micronaut 3.8.0: Build Scalable Applications with the Updated CRaC Feature

 1 year ago
source link: https://www.infoq.com/news/2023/01/micronaut-released-3-8-0/?itm_source=infoq&itm_medium=popular_widget&itm_campaign=popular_content_list&itm_content=
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Micronaut 3.8.0: Build Scalable Applications with the Updated CRaC Feature

Jan 13, 2023 2 min read

Just one week after the release of version 3.7.5, the Micronaut Foundation released Micronaut 3.8.0. This new version brings several exciting features, including support for GraalVM 22.3.0, the ability to use @RequestBean annotations with Java records, and a new command that guides users in creating a Micronaut AWS Lambda project. This release also includes updates to Micronaut Data, Micronaut Security, the Micronaut CLI, and Micronaut Launch, as well as improvements to the Micronaut Maven Plugin.

This release introduces the ability to use @RequestBean annotations with Java records. Before this release, the only way to bind values to the HttpRequest, @PathVariable, @QueryValue or @Header fields was to use a POJO as a controller method parameter and mark it with @RequestBean. In this release, a new CorsFilter class has been added that sends a 403 status code to origins other than localhost when the app runs on localhost. This is intended to protect users against "drive-by localhost attacks" by enabling CORS from any origin on localhost.

Moreover, this release adds support for Azure Cosmos and gives Micronaut Data two new ways to handle multiple tenants. On the other hand, Micronaut Security has been improved with some ahead-of-time optimizations that speed up the time-to-first response and add support for Proof Key for Code Exchange (PKCE). Micronaut Security has also made way for getting OpenID Connect metadata to work without stopping the Netty event loop.

Furthermore, this release brings forth a new command called, mn create-aws-lambda, which allows users to create a Micronaut AWS Lambda project through an interactive prompt. Also, Micronaut Launch and CLI now have more features, such as support for the gitlab-workflow-ci, azure-cosmos-db, localstack and aws-alexa,aws-cdk features. In addition, the Micronaut Maven Plugin has been improved with faster start/stop of test resources, the ability to choose a namespace for shared test resources, and the addition of the CRaC packaging type to create checkpointed Docker images. With these updates, developers will have even more tools to use with Micronaut to make strong, scalable apps.

A new version of its CRaC (Coordinated Restore at Checkpoint) feature has also been released. The update adds support for HikariCP, a popular JDBC connection pool. With this update, developers can now use either the Micronaut Gradle CRaC Plugin or the Micronaut Maven Plugin to build Docker images with a CRaC-enabled JDK and a pre-warmed, checkpointed application. Additionally, Micronaut CRaC can now be used in combination with AWS Lambda SnapStart. These updates will allow developers to create more efficient and scalable applications with Micronaut.

Nonetheless, this release has updates for its cloud offerings, including support for AWS, Azure, GCP, Oracle, and Reactor. Updates to Micronaut AWS include the ability to change the endpoint for the AWS Services SDK and updates to dependencies like the AWS CDK and AWS SDK. Micronaut Azure has been updated to the latest Azure SDK and Azure Functions Java version. In contrast, Micronaut GCP has added support for Google Cloud Events and updated dependencies such as Google Cloud PubSub and Google Secret Manager. Micronaut Oracle now supports Oracle Cloud Infrastructure (OCI) SDK v3, and Project Reactor 3.5.0 has been added to Micronaut Reactor.

Additionally, Micronaut Test has received updates to its dependencies, including JUnit and Mockito. Finally, Micronaut Test Resources has added support for wait strategies and a method to get the TestResourcesClient from an ApplicationContext. These updates will enhance the functionality and performance of applications built with Micronaut.

Developers who want to evaluate Micronaut 3.8.0 can also build applications from Micronaut Launch and read reference material to learn more.

About the Author

A N M Bazlur Rahman

A N M Bazlur Rahman works at Contrast Security as a Sr. Software Engineer. He has more than ten years of professional experience in the software industry, predominantly in Java and Java-related technologies. Recently, he was named a Java Champion.

Outside of his regular work hours, he loves to mentor, write, speak at conferences, and contribute to open-source projects. He is the founder and current moderator of the Java User Group in Bangladesh. He has organized meetups and conferences to share Java-related knowledge with the community since 2013. He was named Most Valuable Blogger (MVP) at DZone, one of the most recognized technology publishers in the world. Besides DZone, he is an editor for the Java Queue at InfoQ, another leading technology content publisher and conference organizer, and an editor at Foojay.io, a place for friends of OpenJDK. In addition, he has published four books about the Java programming language in Bengali; they were bestsellers in Bangladesh.

He earned his bachelor's degree from the Institute of Information Technology, University of Dhaka, Bangladesh, in Information Technology, majoring in Software Engineering. He currently lives in Toronto, Canada.

Show more

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK