Skip to content
Experimental Spring Boot support for R2DBC
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.mvn/wrapper Initial Import Feb 18, 2019
spring-boot-actuator-autoconfigure-r2dbc #17 - Polishing. May 17, 2019
spring-boot-actuator-r2dbc #17 - Polishing. May 17, 2019
spring-boot-autoconfigure-r2dbc #20 - Remove dependency to Spring JDBC from R2dbcProperties. May 18, 2019
spring-boot-dependencies-r2dbc #15 - [maven-release-plugin] prepare for next development iteration. May 15, 2019
spring-boot-example-h2 #17 - Polishing. May 17, 2019
spring-boot-example-r2dbc-actuator #17 - Polishing. May 17, 2019
spring-boot-r2dbc-build #15 - [maven-release-plugin] prepare for next development iteration. May 15, 2019
spring-boot-starter-data-r2dbc #15 - [maven-release-plugin] prepare for next development iteration. May 15, 2019
spring-boot-starter-r2dbc-h2 #15 - [maven-release-plugin] prepare for next development iteration. May 15, 2019
spring-boot-starter-r2dbc #15 - [maven-release-plugin] prepare for next development iteration. May 15, 2019
.editorconfig Initial Import Feb 18, 2019
.gitignore #15 - Ignore release utility files. May 15, 2019
CODE_OF_CONDUCT.adoc URL Cleanup (#4) Apr 15, 2019
LICENSE.txt URL Cleanup (#5) Apr 15, 2019
README.adoc Fix H2 options syntax in readme Mar 6, 2019
documentation.adoc #12 - Fix documentation links. May 14, 2019
mvnw URL Cleanup (#2) Apr 15, 2019
mvnw.cmd URL Cleanup (#2) Apr 15, 2019
pom.xml #17 - Add actuator metrics support for r2dbc-pool. May 17, 2019

README.adoc

Spring Boot R2DBC Starter

This experimental project provides a simple way to try the new R2DBC support through R2DBC Client and Spring Data R2DBC.

Starters

  • spring-boot-starter-r2dbc: Starter using R2DBC Client.

  • spring-boot-starter-data-r2dbc: Starter using Spring Data R2DBC

Supported Drivers

H2 (Embedded)

Dependencies:

<dependency>
  <groupId>io.r2dbc</groupId>
  <artifactId>r2dbc-h2</artifactId>
</dependency>

Configuration embedded mode:

application.properties
# Nothing to do here.
Note
Spring Boot has support for embedded H2 databases using the JDBC interfacing option. Spring Boot’s R2DBC configuration picks up H2 configuration details to ensure all R2DBC operations are executed on the same database instance.

Configuration in-memory:

application.properties
spring.r2dbc.url=rdbc:h2:mem:///<database>?options=DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
spring.r2dbc.username=…
spring.r2dbc.password=…

Configuration file:

application.properties
spring.r2dbc.url=rdbc:h2:file:///<path>/<to>/<database>?options=DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
spring.r2dbc.username=…
spring.r2dbc.password=…

PostgreSQL

Dependencies:

<dependency>
  <groupId>io.r2dbc</groupId>
  <artifactId>r2dbc-postgresql</artifactId>
</dependency>

Configuration:

application.properties
spring.r2dbc.url=rdbc:postgresql://<server>:<port>/<database>
spring.r2dbc.username=…
spring.r2dbc.password=…

SQL Server

Dependencies:

<dependency>
  <groupId>io.r2dbc</groupId>
  <artifactId>r2dbc-mssql</artifactId>
</dependency>

Configuration:

application.properties
spring.r2dbc.url=rdbc:mssql://<server>:<port>/<database>
spring.r2dbc.username=…
spring.r2dbc.password=…
You can’t perform that action at this time.