Commit Graph
188 Commits
Author SHA1 Message Date
Stéphane Nicoll 5399793faf Reinstate Spock support
Closes gh-48513
2025-12-19 15:31:59 +01:00
Stéphane Nicoll 3011155593 Remove support for deprecated logback properties
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
2025-12-19 15:26:01 +01:00
Stéphane Nicoll 7c519ee564 Polish "Add failure analysis for invalid Docker environments"
See gh-47797
2025-12-19 11:45:21 +01:00
Dmytro Nosan 81f7caad24 Add failure analysis for invalid Docker environments
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>
2025-12-19 11:45:20 +01:00
Stefano Cordio b2b0fed285 Decorate all Assert implementations with @CheckReturnValue
See gh-46766

Signed-off-by: Stefano Cordio <stefano.cordio@gmail.com>
2025-12-19 10:39:37 +01:00
Phillip Webb aaf66f4d50 Merge branch '3.5.x' 2025-12-17 20:46:23 -08:00
Phillip Webb e69be7ccce Merge branch '3.5.x'
Closes gh-48569
2025-12-17 11:48:48 -08:00
Stéphane Nicoll d489aa685c Polish "Update AOT tests to fail if deprecated code is not suppressed"
Include use of API that has been marked for removal.

See gh-48566
2025-12-17 15:41:26 +01:00
Stéphane Nicoll b6974ff51a Make MissingParameterNamesFailureAnalyzerTests more robust
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.
2025-12-17 15:31:56 +01:00
Stéphane Nicoll 8e895b3bc0 Update AOT tests to fail if deprecated code is not suppressed
Closes gh-48566
2025-12-17 15:30:44 +01:00
Phillip Webb da516741b2 Consider modules when deducing WebApplicationType
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
2025-12-15 20:30:16 -08:00
Stéphane Nicoll ab69bf9d55 Fix nullability constraint 2025-12-09 17:05:23 +01:00
Stéphane Nicoll 63cfeb01ab Merge branch '3.5.x'
Closes gh-48476
2025-12-09 16:54:14 +01:00
Stéphane Nicoll a98b36efbb Start building against Spring Framework 7.0.2 snapshots
See gh-48439
2025-12-08 14:54:53 +01:00
Andy Wilkinson 46f22b2374 Polish NativeImageRequirementsNotMetException
Closes gh-48307
2025-11-26 15:31:48 +00:00
Stéphane Nicoll 8eb90644a6 Merge branch '3.5.x'
Closes gh-48306
2025-11-26 16:02:42 +01:00
Stéphane Nicoll f6a2cae2bb Merge branch '3.5.x'
Closes gh-48283
2025-11-25 10:01:24 +01:00
Stéphane Nicoll f7f11a4f25 Merge branch '3.5.x'
Closes gh-48275
2025-11-24 16:47:49 +01:00
Stéphane Nicoll 949c227698 Restore ApplicationServletEnvironment in web deployments
Closes gh-48254
2025-11-24 15:34:05 +01:00
Andy Wilkinson 3becdc7d47 Move server.error properties to spring.web.error
Closes gh-48201
2025-11-20 11:55:23 +00:00
Phillip Webb d4b9786b8b Merge branch '3.5.x'
Closes gh-48177
2025-11-18 17:08:35 -08:00
Stefan Würsten 9ccec12506 Move mime-mappings.properties to spring-boot-web-server
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>
2025-11-14 14:52:54 +01:00
Andy Wilkinson 8a52f4931b Merge branch '3.5.x'
Closes gh-48136
2025-11-14 09:10:21 +00:00
Stéphane Nicoll 097184c2e4 Merge branch '3.5.x'
Closes gh-48132
2025-11-14 09:55:46 +01:00
Andy Wilkinson 5281f5c6bc Merge branch '3.5.x'
The issue had already been fixed in 4.0 as part of the nullability
work. As such, this commit doesn't fix anything. It does, however,
merge forward a test and makes some stylistic changes to the code so
that it's aligned with the same code in 3.5.x and 3.4.x
2025-11-13 14:06:46 +00:00
Stéphane Nicoll 3d23261f87 Merge branch '3.5.x'
Closes gh-48122
2025-11-13 14:55:19 +01:00
Stéphane Nicoll d1e5fe3248 Merge branch '3.5.x'
Closes gh-48106
2025-11-13 10:31:25 +01:00
Stéphane Nicoll 73087f369b Merge branch '3.5.x'
Closes gh-48071
2025-11-12 13:08:31 +01:00
Stéphane Nicoll 8584f604e3 Rename maxAttempts to maxRetries
Closes gh-48023
2025-11-11 10:22:08 +00:00
Phillip Webb 6158a52b8c Support deprecated EnvironmentPostProcessor arguments
Fixes gh-48047
2025-11-10 15:51:53 -08:00
Andy Wilkinson ef46636c7e Tolerate Podman's response to docker context ls
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
2025-11-06 09:19:47 +00:00
Phillip Webb 08857b4c7f Cache SystemEnvironmentPropertyMapper configuration property names
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
2025-11-05 14:30:31 -08:00
Stéphane Nicoll a3ba9e3bf4 Merge branch '3.5.x'
Closes gh-47906
2025-11-02 10:58:26 +01:00
Phillip Webb 0f3631b7cc Merge branch '3.5.x'
Closes gh-47899
2025-10-31 09:25:55 -07:00
Stéphane Nicoll b0e2f2c770 Configure application task executor with custom AsyncConfigurer
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
2025-10-31 17:16:49 +01:00
Stéphane Nicoll f11e3f3877 Adapt to new GraalVM metadata format
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
2025-10-31 12:28:01 +01:00
Stéphane Nicoll 30a6b50e82 Align naming change for Jackson components
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
2025-10-29 16:58:16 +01:00
Andy Wilkinson 578b199b6d Merge branch '3.5.x'
Closes gh-47860
2025-10-29 10:25:10 +00:00
Stéphane Nicoll 7bde0e65f1 Fix typos
Closes gh-47818
2025-10-27 14:55:39 +01:00
Stéphane Nicoll 87acda775d Merge branch '3.5.x'
Closes gh-47783
2025-10-24 09:22:53 +02:00
Stéphane Nicoll 728cb95a17 Fix formatting 2025-10-23 14:12:50 +02:00
Andy Wilkinson aa95282290 Polish @since tags
Closes gh-47779
2025-10-23 12:48:58 +01:00
Andy Wilkinson f5dbd8550f Stop Log4j2 configuration to hopefully close the log file
See gh-47424
2025-10-23 12:06:43 +01:00
Andy Wilkinson 2c563004d5 Clean up logging system properties to avoid test pollution
See gh-47424
2025-10-23 11:04:01 +01:00
Andy Wilkinson a120ed4383 Stop logger context so that file handlers are not leaked
See gh-47424
2025-10-23 11:04:01 +01:00
Stéphane Nicoll ffc822d852 Revisit metrics and tracing test properties
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
2025-10-23 11:18:53 +02:00
Phillip Webb 1a8402e938 Polish 'Simplify Log4J2LoggingSystem'
See gh-47424
2025-10-22 23:46:21 -07:00
Piotr P. Karwasz 7d34320401 Simplify Log4J2LoggingSystem
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
2025-10-22 23:41:11 -07:00
Varun Patni f84b17c751 Migrate from Dokkatoo to Dokka
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>
2025-10-22 15:50:29 +01:00
Phillip Webb 739cb529fb Merge branch '3.5.x'
Closes gh-47749
2025-10-21 11:30:56 -07:00