This commit introduces `CodecCustomizer`, a new callback-based interface
for customizing the codecs configuration for WebFlux server and client.
Instances of those customizers are applied to the `WebClient.Builder`
and to the `WebFluxAutoConfiguration` (which deals with both WebFlux and
WebFlux.fn).
For now, only Jackson codecs are auto-configured, by getting the
`ObjectMapper` instance created by Spring Boot. Other codecs can be
configured as soon as WebFlux supports those.
Closes gh-9166
This commit adds a new customizer interface for applying
configuration changes to `WebClient.Builder` beans:
`WebClientCustomizer`.
The new WebClient auto-configuration will make available, as a
prototype scoped bean, `WebClient.Builder` instances.
Once injected, developers can use those to create `WebClient`
instances to be used in their application.
`WebClientCustomizer` beans are sorted according to their
`Order` and then applied to the builder instances.
Closes gh-9522
This commit adds ContextLoader, a test helper that configures an
ApplicationContext that is meant to simulate a particular
auto-configuration scenario.
The auto-configuration, user configuration and environment can be
customized. The loader invokes a ContextConsumer to assert the context
and automatically close the context once it is done.
Concretely, tests can create a shared field instance of that helper with
the shared configuration to increase its visibility and tune the context
further in each test.
If the context is expected to fail, `loadAndFail` allows to optionally
assert the root exception and consume it for further assertions.
This commit also migrates some tests to illustrate the practical use of
the helper
Closes gh-9634
This commit removes the only use of the `javax.annotation.Resource`
annotation from the codebase. This ensures that injection point are
only defined with Spring's annotation model.
Closes gh-9441
This commit updates Spring Session auto-configuration to ensure
compatibility with extraction of `SessionRepository` implementations into
separate Spring Session modules.
See gh-9554
This commit makes sure that each test runs with the proper datasource
auto-configuration and with an isolated embedded database. This allows
to restrict each test to only what it is supposed to do (rather than
disabling initialization to work around the fact that database is not
in a proper state because it is shared).
Closes gh-9579
This commit makes sure that if the `register-mbeans` property of the
Hikary datasource config is set, Spring Boot doesn't attempt to expose
the mbean again.
Closes gh-5114
This commit add the support for CustomConversions in
spring-data-cassandra. To customize, bean just need to be declared and
it will be auto-configured.
See gh-8534
Elastic have announced [1] that embedded Elasticsearch is no longer
supported. This commit brings us into line with that announcement by
removing the auto-configuration that would create an Elasticsearch
Node and NodeClient.
To use the Elasticsearch auto-configuration, a user must now provide
the address of one or more cluster nodes
(via the spring.elastisearch.cluster-nodes property) which will then
be used to create a TransportClient.
See gh-9374
[1] https://www.elastic.co/blog/elasticsearch-the-server
Reducing the default to 100ms is a good compromise to retain a quiet time
in for parallel execution and optimize for default, single-threaded
execution (such as test execution or regular application shutdown). The
shutdown timeout can be adjusted to fit specific application needs.
See gh-9526