Install MariaDB Connector/R2DBC

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

  1. To install Spring module for R2DBC, add the spring-r2dbc package dependency to your application's pom.xml file:

    <dependency>
       <groupId>org.springframework.data</groupId>
       <artifactId>spring-r2dbc</artifactId>
       <version>5.3.9</version>
    </dependency>
    
  2. To install Spring Data module for R2DBC, add the spring-data-r2dbc package dependency to your application's pom.xml file:

    <dependency>
       <groupId>org.springframework.data</groupId>
       <artifactId>spring-data-r2dbc</artifactId>
       <version>1.3.3</version>
    </dependency>
    
  3. To use Spring Framework's core features and Inversion of Control (IoC), also known as Dependency Injection (DI), add the spring-core and spring-context dependencies to pom.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>
    
  4. 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>
    
  5. 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>
    
  6. To install MariaDB Connector/R2DBC, add the r2dbc-mariadb package dependency to pom.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.0</version>
    </dependency>
    
  7. 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>
    
  1. To install Spring module for R2DBC, add the spring-r2dbc package dependency to your application's pom.xml file:

    <dependency>
       <groupId>org.springframework.data</groupId>
       <artifactId>spring-r2dbc</artifactId>
       <version>5.3.9</version>
    </dependency>
    
  2. To install Spring Data module for R2DBC, add the spring-data-r2dbc package dependency to your application's pom.xml file:

    <dependency>
       <groupId>org.springframework.data</groupId>
       <artifactId>spring-data-r2dbc</artifactId>
       <version>1.3.3</version>
    </dependency>
    
  3. To use Spring Framework's core features and Inversion of Control (IoC), also known as Dependency Injection (DI), add the spring-core and spring-context dependencies to pom.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>
    
  4. 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>
    
  5. 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>
    
  6. To install MariaDB Connector/R2DBC, add the r2dbc-mariadb package dependency to pom.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.0</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.