Coder Social home page Coder Social logo

spring-boot-r2dbc's Introduction

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=r2dbc: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=r2dbc:h2:file:///<path>/<to>/<database>?options=DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
spring.r2dbc.username=…
spring.r2dbc.password=…

MySQL

Dependencies (pulled from jitpack.io):

<dependency>
  <groupId>com.github.mirromutth</groupId>
  <artifactId>r2dbc-mysql</artifactId>
</dependency>

<repository>
  <id>jitpack.io</id>
  <url>https://jitpack.io</url>
</repository>

Configuration:

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

PostgreSQL

Dependencies:

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

Configuration:

application.properties
spring.r2dbc.url=r2dbc: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=r2dbc:mssql://<server>:<port>/<database>
spring.r2dbc.username=…
spring.r2dbc.password=…

spring-boot-r2dbc's People

Contributors

mp911de avatar snicoll avatar odrotbohm avatar ttddyy avatar linux-china avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.