Install MariaDB Connector/R2DBC
This page is part of MariaDB's Documentation.
The parent of this page is: Using Spring Data with MariaDB Connector/R2DBC
Topics on this page:
Overview
Spring Data R2DBC and MariaDB Connector/R2DBC are usually installed using Maven.
It should also be possible to install Spring Data R2DBC and MariaDB Connector/R2DBC by downloading the JAR files. Because Spring Data R2DBC has many dependencies we recommend using Maven, so that dependencies can be resolved by Maven.
Install MariaDB Connector/R2DBC via Maven
To install Spring module for R2DBC, add the
spring-r2dbc
package dependency to your application'spom.xml
file:<dependency> <groupId>org.springframework.data</groupId> <artifactId>spring-r2dbc</artifactId> <version>5.3.9</version> </dependency>
To install Spring Data module for R2DBC, add the
spring-data-r2dbc
package dependency to your application'spom.xml
file:<dependency> <groupId>org.springframework.data</groupId> <artifactId>spring-data-r2dbc</artifactId> <version>1.3.3</version> </dependency>
To use Spring Framework's core features and Inversion of Control (IoC), also known as Dependency Injection (DI), add the
spring-core
andspring-context
dependencies topom.xml
:<dependency> <groupId>org.springframework</groupId> <artifactId>spring-core</artifactId> <version>5.3.9</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> <version>5.3.9</version> </dependency>
For Non-Blocking reactive streams, add the Reactor Core dependency to
pom.xml
:<dependency> <groupId>io.projectreactor</groupId> <artifactId>reactor-core</artifactId> <version>3.4.8</version> </dependency>
For testing reactive streams, add the Reactor Test dependency to
pom.xml
:<dependency> <groupId>io.projectreactor</groupId> <artifactId>reactor-test</artifactId> <version>3.4.8</version> </dependency>
To install MariaDB Connector/R2DBC, add the
r2dbc-mariadb
package dependency topom.xml
.To install the latest Connector/R2DBC 1.0 release, add the following:
<dependency> <groupId>org.mariadb</groupId> <artifactId>r2dbc-mariadb</artifactId> <version>1.0.3</version> </dependency>
To install the latest Connector/R2DBC 1.2 release, add the following:
<dependency> <groupId>org.mariadb</groupId> <artifactId>r2dbc-mariadb</artifactId> <version>1.2.1</version> </dependency>
If you plan to use Connection Pools, add the r2dbc-pool package dependency to
pom.xml
.For Connector/R2DBC 1.0:
<dependency> <groupId>io.r2dbc</groupId> <artifactId>r2dbc-pool</artifactId> <version>0.8.7.RELEASE</version> </dependency>
For Connector/R2DBC 1.2:
<dependency> <groupId>io.r2dbc</groupId> <artifactId>r2dbc-pool</artifactId> <version>0.9.0.M2</version> </dependency>
To build your application, run Maven:
$ mvn package
During the build process, Maven downloads and installs MariaDB Connector/R2DBC and other dependencies from the relevant repositories.