Update `ClientHttpRequestFactoryBuilder` with a detect method that
accepts a specific classloader and update `HttpClientAutoConfiguration`
to use it.
Fixes gh-44986
@ServletRegistration and @FilterRegistration can be used as an
annotation-based alternative to ServletRegistrationBean and
FilterRegistrationBean.
Closes gh-16500
Add a new `ClientHttpConnectorBuilder` interface to support the
creation of `ClientHttpConnector` instances. The new code is similar
to the `ClientHttpRequestFactoryBuilder` interface that was added to
Spring Boot 3.4.
The `ClientHttpConnectorBuilder` is a functional interface with
additional static factory methods for the various supported
`ClientHttpConnector` types. Each type has it's own builder
which to support client specific customization.
The previous auto-configuration has been relocated to the
`org.springframework.boot.autoconfigure.http.client.reactive`
package and updated to make use of the builder.
Closes gh-43079
Update `IndexedElementsBinder` so that bind operations are faster at
the expense of not checking that all elements have been bound. The
updated code now uses a window of 10 elements and assumes that if
no elements are missing from that window then exhaustive checking is
not required.
Closes gh-44867
Replace a few usages of stream with simple for loops. Although
this doesn't seem to make much difference to performance, it does
help when profiling applications since it reduces the stack
depth.
Add a simple cache that is used for the system environment property
source to cache `containsDescendantOf` results since descendants
cannot be used due to the more complicated algorithm.
Closes gh-44863
Update `ConfigurationPropertySource` adapters so accessing the
`SystemEnvironmentPropertySource` is handled by directly calling
the source.
This saves potentially expensive calls to `resolvePropertyName`
which are unnecessary since mappings are handled directly.
Closes gh-44862
Introduce a general purpose cache in the `Binder` and make use of it
in `JavaBeanBinder` and `ValueObjectBinder` to reuse potentially
expensive operations.
Closes gh-44861
Add `ConfigurationPropertyCaching.override()` method which can be
used to temporarily enable caching for the duration of an
operation.
The `Binder` now uses this method to ensure that caching is
enabled whilst a set of related binding operations are performed.
Closes gh-44860
Update `SystemEnvironmentPropertySourceEnvironmentPostProcessor` so
that our origin aware subclass is marked as immutable. This aligns
with the behavior we had before introducing origin tracking, which
assumes that environment variables changes made after the application
starts are not re-bound.
Closes gh-44859
Update `ConfigurationPropertyName` to improve performance of
the `equals(...)` and `hashCode()` methods by making the
following changes:
- Move element hashCode logic to Element and cache the results
- Exit the equals method early if hashcodes don't match
- Exit the equals method early if toString() values match
Closes gh-44857