Micronaut® Data is a productivity-boosting Open Source technology that dramatically improves the runtime and memory performance of data access repository logic for the microservice and serverless era.
A Data-Access Toolkit Optimized for Cloud Computing
In a world of cloud computing, where billing models charge for the amount of time your application is running or the execution time of an individual function, data-access toolkit performance is critical. Because Micronaut Data does no query translation at runtime, the performance gain is significant.
Reduced Cold Starts
Lean Memory Consumption
Improved Performance
Cost Savings
A Simple solution
Interacting with a database with direct JDBC or JPA is as easy as declaring an interface.
Micronaut Data handles the rest!
- package example.repositories;
-
- import java.util.List;
- import java.util.Optional;
-
- import example.domain.Owner;
- import io.micronaut.data.jdbc.annotation.JdbcRepository;
- import io.micronaut.data.model.query.builder.sql.Dialect;
- import io.micronaut.data.repository.CrudRepository;
-
- @JdbcRepository(dialect = Dialect.H2)
- public interface OwnerRepository extends CrudRepository<Owner, Long> {
-
- @Override
- List<Owner> findAll();
-
- Optional<Owner> findByName(String name);
- }
- v