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
Previously, dependency management for JNA was provided by
spring-boot-dependencies so it affected users' applications. It was
original added for Elasticsearch but is no longer needed for that
purpose. We use JNA in spring-boot-buildpack-platform which is used
by our Gradle and Maven plugins and should not affect an application's
use of JNA.
This commit moves management of JNA from spring-boot-dependencies into
spring-boot-parent. This means that users' applications will now be
free to use whatever version of JNA meets their needs while still
controlling the version used for image building via Gradle or Maven.
Closes gh-20156
Previously, the configprop macro was being used in the source but the
extension that implements the macro was not available to Asciidoctor.
This led to the references not being checked at build time and the
macro being left as-is in the rendered documentation.
This commit updates the dependencies that are available to Asciidoctor
to include the extension and the projects which define the
configuration properties referenced in the documentation.
Closes gh-20149
This commit fixes the `Created` date and time of the ephemeral builder
container image at the Windows epoch plus one second
(1980-01-01T00:00:01Z). This date matches the created date of the builder
image and influences the created date of the resulting image. Using
a fixed date for images ensures that the digest is consistent for all
images with the same version.
Fixes gh-20126
This commit adds a `createdBy` structure to the metadata of the ephemeral
builder container image that identifies Spring Boot as the creator of the
image, along with the Spring Boot version.
See gh-20126
Prior to this commit, Actuator endpoints would use the application
ObjectMapper instance for serializing payloads as JSON. This was
problematic in several cases:
* application-specific configuration would change the actuator endpoint
output.
* choosing a different JSON mapper implementation in the application
would break completely some endpoints.
Spring Boot Actuator already has a hard dependency on Jackson, and this
commit uses that fact to configure a shared `ObjectMapper` instance that
will be used by the Actuator infrastructure consistently, without
polluting the application context.
This `ObjectMapper` is used in Actuator for:
* JMX endpoints
* Spring MVC endpoints with an HTTP message converter
* Spring WebFlux endpoints with an `Encoder`
* Jersey endpoints with a `ContextResolver<ObjectMapper>`
For all web endpoints, this configuration is limited to the
actuator-specific media types such as
`"application/vnd.spring-boot.actuator.v3+json"`.
Fixes gh-12951
Along with surrounding map keys with dot from VCAP_SERVICES with `[ ]`,
this commit also does that for non-alphanumeric and `-` characters so that
they are not stripped off later.
See gh-18915
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 upgrades the default CNB builder image from
cloudfoundry/cnb:0.0.43-bionic to cloudfoundry/cnb:0.0.53-bionic.
It also adds integration tests for the Maven and Gradle plugins
to verify both versions are supported.
Cloud Native Buildpacks platform API version 0.2 introduced
two breaking changes: the order of invoking the restore and analyze
phases was reversed, and the cache phase was removed in favor of
distributing caching across other phases.
This commit adds support for Cloud Native Buildpacks builders that
implement platform API version 0.2, while maintaining compatibility
with builders that implement Lifecycle version platform API
version 0.1.
Closes gh-19829
This commit registers 'org.springframework.boot.deployed' to
spring-boot-configuration-metadata and spring-boot-properties-migrator
to make sure they are deployed as expected.
See gh-20051
This partially re-applies the deprecation removal from commit
df1837a16b,
without removing CompositeHealthIndicator, HealthAggregator, and related
configuration that is required by Spring Cloud.
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