Update `ValueObjectBinder` so that `Optional` parameters are bound as
`Option.empty()` rather than `null`.
See gh-49152
Signed-off-by: Ondřej Světlík <16480390+osvetlik@users.noreply.github.com>
In the brackets we can now specify the encoding of the file instead of
only the file extension:
spring.config.import=classpath:import.properties[encoding=utf-8]
The old format
spring.config.import=classpath:import[.properties]
is still supported and is a shorthand for:
spring.config.import=classpath:import[extension=.properties]
Attributes can be combined, too:
spring.config.import=classpath:import[extension=.properties][encoding=utf-8]
Closes gh-28663
This commit removes support for the following properties that are
deprecated since Spring Boot 2.4:
- logging.pattern.rolling-file-name
- logging.file.clean-history-on-start
- logging.file.max-size
- logging.file.total-size-cap
- logging.file.max-history
Closes gh-48489
This commit introduces a failure analyzer implementation that provides
actionable guidance when Testcontainers fails to detect a running
Docker-compatible environment.
See gh-47797
Signed-off-by: Dmytro Nosan <dimanosan@gmail.com>
Explicitly nullify `ParameterNameDiscovery` to simulate code that has
not been compiled with `-parameters`. Previously we were relying on an
initialization behavior that could change and break those tests.
Introduce a strategy to `WebApplicationType` to allow modules to
implement deduction logic.
Prior to this commit, modules played no part in deducing the
`WebApplicationType`. This meant that a user with `spring-webflux`
for client purposes would deduce `REACTIVE` despite no
`spring-boot-webflux` module being present.
The following deduction logic order is now implemented:
1) If the `spring-boot-webmvc` module is being used and Spring MVC
classes are found then `SERVLET` is used.
2) If the `spring-boot-webflux` module is being used and Spring WebFlux
classes are found then `REACTIVE` is used.
3) If `spring-web` is found and servlet classes are available then
`SERVLET` is used.
4) If none of the above are satisfied, `NONE` is used.
This commit also updates `SpringBootTestContextBootstrapper` to use
the same deduction logic.
Fixes gh-48517
This commit moves mime-mapping.properties in the module that actually
uses it, rather than in the top-level spring-boot module.
See gh-48138
Signed-off-by: Stefan Würsten <stefan@wuersten.ch>
In Spring Boot 3.x with Jackson 2, a null (or missing) value for
a primitive would be mapped to the primitive's default value. In
Jackson 3, the default behavior is to fail instead. This causes a
failure when trying to deserialize Podman's
`docker context ls response` as it is not in the expected format
and has no entry for `current` that's mapped to a boolean.
This commit disables FAIL_ON_NULL_FOR_PRIMITIVES to restore the
behavior that we had with Jackson 2 in Spring Boot 3.x.
Closes gh-47971
Add a static cache to `SystemEnvironmentPropertyMapper` for property
source name to configuration property name conversion. This update
should help ease object allocations for system environment names which
are unlikely to change often.
Closes gh-14121
Previously, any user that defines an AsyncConfigurer should provide
the async executor as well, given that our auto-configuration no longer
defines a "taskExecutor" bean.
This commit extends our auto-configuration of async processing to
use the "applicationTaskExecutor" bean name transparently if a user
has configured an AsyncConfigurer, but did not override the
getAsyncExecutor method.
Closes gh-47897
This commit updates our web resources patterns due to a change in the
GraalVM metadata format. Previously a single `*` was considering a
directory and its sub-folders. The same behavior now requires two `*`.
Closes gh-47894
This commit polishes the renaming of JsonComponent to JacksonComponent
and the use of JacksonModule instead of Module in Jackson 2.
This also adds integration tests that use a JacksonComponent with
WebMvcTest and WebFluxTest.
Closes gh-47864
This commit renames 'spring.test.metrics.auto-configure' and
'spring.test.tracing.auto-configure' for consistency with the non-test
properties. It also adds a configuration metadata entry for
'spring.test.observability.auto-configure' that's superseded by these
two properties.
Closes gh-47776