• Stephane Nicoll's avatar
    Add auto-configuration for R2DBC's ConnectionFactory · 5c174feb
    Stephane Nicoll authored
    This commit adds auto-configuration for R2DBC. If R2DBC is on the
    classpath, a `ConnectionFactory` is created similarly to the algorithm
    used to create a `DataSource`.
    
    If an url is specified, it is used to determine the R2DBC driver and
    database location. If not, an embedded database is started (with only
    support of H2 via r2dbc-h2). If none of those succeed, an exception is
    thrown that is handled by a dedicated FailureAnalyzer.
    
    To clearly separate reactive from imperative access, a `DataSource` is
    not auto-configured if a `ConnectionFactory` is present. This makes sure
    that any auto-configuration that relies on the presence of a
    `DataSource` backs off.
    
    There is no dedicated database initialization at the moment but it is
    possible to configure flyway or liquibase to create a local `DataSource`
    for the duration of the migration. Alternatively, if Spring Data R2DBC
    is on the classpath, a `ResourceDatabasePopulator` bean can be defined
    with the scripts to execute on startup.
    
    See gh-19988
    Co-authored-by: 's avatarMark Paluch <mpaluch@pivotal.io>
    5c174feb
Name
Last commit
Last update
.github Loading commit data...
buildSrc Loading commit data...
ci Loading commit data...
eclipse Loading commit data...
git/hooks Loading commit data...
gradle/wrapper Loading commit data...
idea Loading commit data...
spring-boot-project Loading commit data...
spring-boot-tests Loading commit data...
src/checkstyle Loading commit data...
.editorconfig Loading commit data...
.gitignore Loading commit data...
CODE_OF_CONDUCT.adoc Loading commit data...
CONTRIBUTING.adoc Loading commit data...
LICENSE.txt Loading commit data...
README.adoc Loading commit data...
SUPPORT.adoc Loading commit data...
build.gradle Loading commit data...
gradle.properties Loading commit data...
gradlew Loading commit data...
gradlew.bat Loading commit data...
settings.gradle Loading commit data...