Skip to content

micronaut-projects/micronaut-data

Folders and files

NameName
Last commit message
Last commit date
Jul 1, 2024
Apr 2, 2024
Oct 13, 2023
Jul 1, 2024
Jul 5, 2024
Sep 4, 2023
Jun 30, 2023
Jun 24, 2024
Sep 28, 2023
Jun 28, 2024
Apr 4, 2024
Apr 25, 2024
Jul 8, 2024
May 22, 2024
Jul 5, 2024
Jun 25, 2024
Jul 5, 2024
Jun 26, 2024
Jun 28, 2024
Jul 5, 2024
Jul 5, 2024
Sep 18, 2023
Apr 3, 2024
May 22, 2024
Jul 5, 2024
Apr 3, 2024
Apr 2, 2024
May 22, 2024
Jul 5, 2024
Jul 9, 2024
Jul 5, 2024
Aug 14, 2023
Oct 13, 2023
Mar 23, 2023
Nov 7, 2023
Sep 24, 2021
Apr 2, 2024
Jun 3, 2020
Nov 7, 2023
Apr 2, 2024
Nov 7, 2023
May 23, 2023
Jul 5, 2024
Jul 1, 2024
Mar 27, 2024
Jul 5, 2024

Repository files navigation

Micronaut Data

Maven Central Quality Gate Status Revved up by Develocity

Micronaut Data is a database access toolkit that uses Ahead of Time (AoT) compilation to pre-compute queries for repository interfaces that are then executed by a thin, lightweight runtime layer.

Micronaut Data is inspired by GORM and Spring Data, however improves on those solutions in the following ways:

  • Compilation Time model - Both GORM and Spring Data maintain a runtime metamodel that uses reflection to model relationships between entities. This model consumes significant memory and memory requirements grow as your application size grows. The problem is worse when combined with Hibernate which maintains its own metamodel as you end up with duplicate metamodels. Micronaut Data instead moves this model into the compiler.
  • No query translation - Both GORM and Spring Data use regular expressions and pattern matching in combination with runtime generated proxies to translate a method definition on a Java interface into a query at runtime. No such runtime translation exists in Micronaut Data and this work is carried out by the Micronaut compiler at compilation time.
  • No Reflection or Runtime Proxies - Micronaut Data uses no reflection or runtime proxies, resulting in better performance, smaller stack traces and reduced memory consumption due to a complete lack of reflection caches (Note that the backing implementation, for example Hibernate, may use reflection).
  • Type Safety - Micronaut Data will actively check at compile time that a repository method can be implemented and fail compilation if it cannot.

See also the Micronaut Data Announcement for details about how and why Micronaut Data was built.

Quick Start

To get started quickly with Micronaut Data JPA you can use Micronaut Launch either via the web browser or curl to create a correctly configured application with a Gradle build:

$ curl https://launch.micronaut.io/demo.zip?features=data-jpa -o demo.zip
$ unzip demo.zip -d demo

Or for Micronaut Data JDBC:

$ curl https://launch.micronaut.io/demo.zip?features=data-jdbc -o demo.zip
$ unzip demo.zip -d demo

Note that you can append &build=maven to the URL to switch to a Maven build.

Documentation

See the Documentation for more information.

See the Snapshot Documentation for the current development docs.

Snapshots and Releases

Snaphots are automatically published to JFrog OSS using GitHub Actions.

See the documentation in the Micronaut Docs for how to configure your build to use snapshots.

Releases are published to Maven Central via GitHub Actions.

A release is performed with the following steps: