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 DataSourceBuilder can configure
SimpleDriverDataSource by adding an alias for the driver's class name.
Closes gh-20220
Co-authored-by: Dmytro Nosan <dimanosan@gmail.com>
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 changes DataSourceHealthIndicator to validate the connection
rather than issuing a query to the database. If a custom validation
query is specified, it uses that as before.
Closes gh-17582
As of spring-projects/spring-framework#22644, Spring Framework caches
the "produces" condition when matching for endpoints in the
`HandlerMapping` infrastructure. This has been improved in
spring-projects/spring-framework#23091 to prevent side-effects in other
implementations.
Prior to this commit, the Spring Boot actuator infrastructure for
`EndpointHandlerMapping` would not clear the cached attribute,
presenting the same issue as Spring Framework's infrastructure. This
means that a custom arrangement with custom `HandlerMapping` or
`ContentTypeResolver` would not work properly and reuse the cached
produced conditions for other, unintented, parts of the handler mapping
process.
This commit clears the cached data and ensures that other handler
mapping implementations are free of that side-effect.
Fixes gh-20150