Introduce an alternative autoconfiguration if the lettuce Redis driver is
available. Add Lettuce-specific configuration property options
"spring.redis.lettuce.shutdown-timeout" to control the shutdown timeout
of the lettuce driver. Add documentation for the properties, the
supported drivers, and how to switch between drivers.
Split client-specific properties from spring.redis.pool to
spring.redis.jedis.pool and introduce spring.redis.lettuce namespace.
Deprecate spring.redis.pool property.
See gh-5311
CachePublicMetrics wasn't explicitly tested and was still using field
injection. This commit improves the situation in preparation of the fix
for gh-8984
Update `SpringApplicationBuilder` so that the `sources(...)` method
updates the primary sources. Prior to this commit, the fix for #8910
had the unfortunate side effect of stopping the
`SpringApplicationBuilder` from being used with
`spring.application.main` properties.
Fixes gh-9053
Update `ConfigurationPropertySourcesPropertySource` to no longer use
`try/catch` when checking for valid names. A new `isValid` method has
been introduced to `ConfigurationPropertyName` which is offers better
performance.
Fixes gh-9058
Update the `Binder` to short circuit potentially expensive bean binding
if there are no known child properties. The shortcut can only be applied
when all used `ConfigurationPropertySources` return a non empty
`containsDescendantOf` result. This should be the case for most
Spring Boot applications, the exception being any apps that are running
in a security restricted environment.
Fixes gh-9023
Update `ConfigurationPropertySource` with a `containsDescendantOf`
method that can be used to tell if a source contains any descendants
of the given name.
The result is Optional so that sources that cannot determine a result
may return `empty()`.
The existing `IterableConfigurationPropertiesSource` has a default
implementation that works by iterating the contained values. Most other
sources return `empty()` with the exception of the adapted
`RandomProperySource` with will return true for `random.*` names.
See gh-9023
Update `NoUnboundElementsBindHandler` to also support ignoring
nested properties. This change is required to allow the
`NoUnboundElementsBindHandler` to be used alongside the
`IgnoreNestedPropertiesBindHandler`.
See gh-9000
Create separate `IterableConfigurationPropertySource` and
`ConfigurationPropertySource` interfaces so that it's possible to
work out if a source can truly iterate the values that it contains.
Prior to this commit there was only a single
`ConfigurationPropertySource` interface, which returned an empty
Iterator when values could not be iterated. This design made it
impossible to tell the difference between a source that was empty, and
a source that could not be iterated.
The `ConfigurationPropertySources` class has been updated to adapt
non-enumerable and enumerable Spring PropertySources to the correct
`ConfigurationPropertySource` interface. It also deals with the edge
case of the `SystemPropertySource` running in a security restricted
environment.
Fixes gh-9057
Update `DefaultServletWebServerFactoryCustomizerTests` so that the Jetty
access log tests use the default timezone. Prior to this commit it was
possible that running the tests outside of UTC could result in Jetty
throwing a "negative delay" IllegalArgumentException.
See gh-8819