This commit adds support for gracefully shutting down the embedded
web server. When a grace period is configured
(server.shutdown.grace-period), upon shutdown, the web server will no
longer permit new requests and will wait for up to the grace period
for active requests to complete.
Closes gh-4657
This commit adds a new auto-configuration for RSocket support in Spring
Integration.
Given an application with `spring-messaging`, `spring-integration-rsocket`
and RSocket dependencies, developers are now able to leverage Spring
Integration features with RSocket.
It is now possible to configure an RSocket server with
`"spring.rsocket.server.*"` properties and let it use
`IntegrationRSocketEndpoint` or `RSocketOutboundGateway` components to
handle incoming RSocket messages. This infrastructure can handle Spring
Integration RSocket channel adapters and `@MessageMapping` handlers
(given `"spring.integration.rsocket.server.message-mapping-enabled"`is
configured.
If the `"spring.integration.rsocket.client.host"` and
`"spring.integration.rsocket.client.port"` (for TCP protocol), or
`"spring.integration.rsocket.client.uri"` (for WebSocket) is configured
then a `ClientRSocketConnector` will be configured accordingly.
Closes gh-18834
Co-authored-by: Brian Clozel <bclozel@pivotal.io>
This commit adds auto-configuration support for Spring Data R2DBC. If a
`ConnectionFactory` and Spring Data are available, scanning of reactive
repositories is enabled.
This commit also adds a starter to bring R2DBC and the necessary Spring
Data libraries.
See gh-19988
Co-authored-by: Mark Paluch <mpaluch@pivotal.io>
Co-authored-by: Oliver Drotbohm <odrotbohm@pivotal.io>
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>
This commit brings MongoClientFactory and ReactiveMongoClientFactory
into functional alignment and reduces duplication in the classes
and their tests.
There are no behavior changes to ReactiveMongoClientFactory.
MongoClientFactory now throws an exception when a URI is configured
along with a host, port, or credentials, where it previousy ignored
host, port, and credentials silently. MongClientFactory now also
supports MongoClientSettingsBuilderCustomizers.
Fixes gh-20019
This commit makes sure that a fallback embedded datasource is not
created if no suitable connection pool is found and an url has been
explicitly registered.
This is consistent with EmbeddedDataSourceConfiguration as it is using
EmbeddedDatabaseBuilder behind the scenes and the latter does not
honour the configured URL anyway.
Closes gh-19192
This commit makes sure to create a HazelcastClient if an instance name
is provided in configuration and if no such client already exists. This
harmonizes the behaviour with of the server counter-part.
See gh-20109
This commit changes the classpath check condition to verify that the
core module of the MongoDB driver is present. Previously, we were only
checking for the presence of the sync driver, making embedded support
unavailable with the reactive variant.
Closes gh-19960