12.2 Configurations for Data Access
The table summarizes the configuration modules and the dependencies you should add to your build to enable them.
Dependency | Description |
---|---|
| Configures SQL DataSource instances using Commons DBCP |
| Configures SQL DataSource instances using Hikari Connection Pool |
| Configures SQL DataSource instances using Tomcat Connection Pool |
| Configures Hibernate/JPA EntityManagerFactory beans |
| Configures GORM for Hibernate for Groovy applications |
| Configures the MongoDB Reactive Driver |
| Configures GORM for MongoDB for Groovy applications |
| Configures the Bolt Java Driver for Neo4j |
| Configures GORM for Neo4j for Groovy applications |
| Configures the Reactive MySQL Client |
| Configures the Reactive Postgres Client |
| |
| Configures the Datastax Java Driver for Cassandra |
For example, to add support for MongoDB you define the following dependency:
build.gradle
compile "io.micronaut.mongodb:micronaut-mongo-reactive"
For Groovy users, Micronaut provides special support for GORM.
For GORM for Hibernate you should not have both the hibernate-jpa and hibernate-gorm dependency. |
The following sections go into more detail about configuration options and the exposed beans for each implementation.