spring-boot/spring-boot-project
Stephane Nicoll 5c174feb65 Add auto-configuration for R2DBC's ConnectionFactory
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: Mark Paluch <mpaluch@pivotal.io>
2020-02-25 09:12:28 -05:00
..
spring-boot Merge branch '2.2.x' 2020-02-24 15:04:35 -08:00
spring-boot-actuator Merge branch '2.2.x' 2020-02-21 18:48:54 +01:00
spring-boot-actuator-autoconfigure Revert "Add actuator specific ObjectMapper" 2020-02-21 17:16:24 +01:00
spring-boot-autoconfigure Add auto-configuration for R2DBC's ConnectionFactory 2020-02-25 09:12:28 -05:00
spring-boot-cli Explicitly set java home in CommandLineInvoker 2020-02-24 08:48:35 +01:00
spring-boot-dependencies Add auto-configuration for R2DBC's ConnectionFactory 2020-02-25 09:12:28 -05:00
spring-boot-devtools Use new AssertJ duration assertions 2020-01-30 08:14:49 +01:00
spring-boot-docs Merge branch '2.2.x' 2020-02-25 09:00:30 -05:00
spring-boot-parent Move dependency management for JNA into spring-boot-parent 2020-02-13 12:26:40 +00:00
spring-boot-properties-migrator Add missing deployed plugin to modules 2020-02-06 16:29:20 +01:00
spring-boot-starters Remove spring security dependencies from Rsocket starter 2020-02-20 14:20:36 -08:00
spring-boot-test Remove redundant useJUnitPlatform declarations 2020-02-17 09:15:57 +01:00
spring-boot-test-autoconfigure Polish 2020-02-19 09:34:46 +01:00
spring-boot-tools Test the Gradle plugin against Gradle 6.2.1 2020-02-25 05:52:00 -05:00