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
Streamline and harden `Log4J2LoggingSystem` by delegating more
functionality. The commit makes updates in two key areas:
Previously, each method fetched the `LoggerContext` directly from
`LogManager` and cast it to `....core.LoggerContext`. This approach
has several issues:
* ClassCastException risks:
- When Log4j Core is on the classpath but not the active implementation
(e.g. when `log4j-to-slf4j` is used).
- During shutdown, when `LogManager` may return a `SimpleLoggerContext`
(see spring-projects/spring-boot#26953).
* Unexpected reinitialization:
- If the logger context had already been stopped, `Log4J2LoggingSystem`
would trigger creation of a new context, even mid-shutdown.
Configuration file detection was previously hardcoded in
`Log4J2LoggingSystem`, which limited flexibility:
* Harder to support additional configuration formats.
* Coupled Spring Boot to internal Log4j Core classes such as
`AuthorizationProvider`.
This change now delegates configuration resolution to Log4j. This reduces
reliance on internal APIs and allows Log4j Core to handle configuration
formats and factories more naturally.
Signed-off-by: Piotr P. Karwasz <piotr@github.copernik.eu>
See gh-47424
This commit migrates from Dokkatoo to Dokka for generation of Kotlin
API documentation.
See gh-47706
Signed-off-by: Varun Patni <varun.patni1@gmail.com>
Replace `BaseUrl` and `BaseUrlProvider` provider code with a more
targeted `LocalTestWebServer` class.
The `LocalTestWebServer` can be used to obtain the url of the locally
running server, or provide `UriBuilderFactory` or `UriBuilder`
instances base on it.
This commit also updates the MockMVC HTML Unit auto-configuration to
directly use `localhost` as the base URL.
Closes gh-47680
* Update dependencies name
Modules are prefixed with `testcontainers-`
* Update container classes
Container classes are under `org.testcontainers.<module-name>` package
See gh-47664
Signed-off-by: Eddú Meléndez <eddu.melendez@gmail.com>