Commit Graph
42 Commits
Author SHA1 Message Date
Stéphane Nicoll b9ebff0084 Use RestClient in tests and infrastructure code
Closes gh-51120
2026-07-24 15:10:43 +02:00
Lee JiWon 4b542efc0c Only set Partitioned cookie attribute when true
The session cookie's Partitioned attribute was set to "" for any
non-null value, so an explicit `partitioned=false` was rendered the
same as `true`. PropertyMapper.to() only filters null, so
Boolean.FALSE reached the consumer and the attribute was always set.

Use whenTrue() so the attribute is set only when partitioned is true,
leaving false and unset to fall through to the container default.

Closes gh-50781

Signed-off-by: Lee JiWon <dlwldnjs1009@gmail.com>
2026-06-18 16:52:55 +02:00
Stéphane Nicoll 98084aab2b Reformat additional-spring-configuration-metadata.json files 2026-05-30 14:28:53 +02:00
Andy Wilkinson add52b6ccd Merge branch '3.5.x' into 4.0.x
Closes gh-50439
2026-05-14 15:02:24 +01:00
Andy Wilkinson b02f7ddea3 Fix Partitioned session cooke attribute configuration with Tomcat
Fixes gh-50201
2026-04-24 15:06:38 +01:00
Andy Wilkinson cbfbe59581 Upgrade to Nullability Plugin 0.0.11
In addition to the upgrade, this commit also fixes some contract
violations in non-public APIs that are now detected as the new
version of the plugin enables contract checking by default.

Closes gh-49000
2026-01-28 10:46:42 +00:00
Yanming Zhou 5733ee723e Remove unnecessary @ConfigurationPropertiesSource
Remove @ConfigurationPropertiesSource from classes that reside in
the same module as all referencing @ConfigurationProperties classes.

Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>

See gh-48934
2026-01-23 10:33:35 +00:00
Andy Wilkinson 0ffffee4bf Upgrade to Nullability Plugin 0.0.9
Closes gh-48638
2026-01-08 11:59:51 +00:00
Andy Wilkinson 9bd1a460a1 Correct packaging of test code
Closes gh-48699
2026-01-08 11:43:43 +00:00
Stéphane Nicoll 1f4a8dff98 Restore RANDOM_PORT handing in tests with a separate management port
This commit fixes a regression where RANDOM_PORT was no longer honored
if a defined management port is set. Due to the modularization efforts,
the code has moved from an EnvironmentPostProcessor to an
ApplicationListener. Unfortunately, the listener is registered too
late to handle the event it is listening to. While the event type could
have been changed, the listener was added on the ApplicationContext
which are not honored before the ApplicationContext is in a state to be
used.

The contract of ContextCustomizerFactory is already giving us everything
we need. While the environment is post-processed later than we would
like, it is still post-processed before the refresh state so that the
additional property is honored.

This commit also adds an integration test to cover this scenario.

Closes gh-48653
2025-12-31 17:10:39 +01: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 8e895b3bc0 Update AOT tests to fail if deprecated code is not suppressed
Closes gh-48566
2025-12-17 15:30:44 +01:00
Stéphane Nicoll 14a67f7c6e Polish "Upgrade to Tomcat 11.0.15"
See gh-48467
2025-12-08 17:42:49 +01:00
Andy Wilkinson 3becdc7d47 Move server.error properties to spring.web.error
Closes gh-48201
2025-11-20 11:55:23 +00: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 b65fe6520a Merge branch '3.5.x'
Closes gh-48134
2025-11-14 08:57:57 +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 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
Stéphane Nicoll aceaee89ee Polish "Replace BaseUrl with LocalTestWebServer"
See gh-47680
2025-10-21 11:08:48 +02:00
Phillip Webb 41a399c5ae Replace BaseUrl with LocalTestWebServer
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
2025-10-20 17:44:51 -07:00
Moritz Halbritter 64136a9901 Remove public modifier from referenced configurations in auto-configurations
Closes gh-47715
2025-10-20 15:18:11 +02:00
Andy Wilkinson 55e7c83498 Allow modules to contribute to Devtools' default properties
Closes gh-44792
2025-10-15 20:19:02 +01:00
Moritz Halbritter 655de9b1c3 Add nullability annotations to tests in module/spring-boot-web-server
See gh-47263
2025-10-15 16:58:21 +02:00
Moritz Halbritter 1b59d45621 Add nullability annotations to tests in module/spring-boot-tomcat
See gh-47263
2025-10-15 16:58:20 +02:00
Moritz Halbritter 5906185fd8 Improve null-safety of module/spring-boot-web-server
See gh-47263
2025-10-15 16:58:20 +02:00
Moritz Halbritter c92617a015 Add nullability annotations to tests in module/spring-boot-jetty
See gh-47263
2025-10-06 13:07:57 +02:00
Phillip Webb 2a521ce4e9 Remove spring-boot-web-server-test module
Remove the `spring-boot-web-server-test` module, adding
`SpringBootTestRandomPortContextCustomizerFactory` to
`spring-boot-web-server` as a replacement for
`SpringBootTestRandomPortApplicationListener`.

See gh-46356
See gh-47322
2025-10-01 21:54:54 -07:00
Phillip Webb bba56ffc8b Move RestTestClientBuilderCustomizer to spring-boot-test
Relocate `RestTestClientBuilderCustomizer` to `spring-boot-test`
and break the direct link to web-server by making use of
`spring.factories` and the new `BaseUrlProviders` class.

See gh-46356
2025-10-01 21:51:20 -07:00
Phillip Webb 6f909114e7 Move WebTestClientBuilderCustomizer to spring-boot-test
Relocate `WebTestClientBuilderCustomizer` to `spring-boot-test`
and break the direct link to web-server and http-codec by making
use of `spring.factories` and the new `BaseUrlProviders` class.

A new `spring-boot-test-integration-test` module has also been
added to ensure hold the previous tests.

See gh-46356
2025-10-01 21:50:13 -07:00
Phillip Webb 79091f926d Introduce BaseUrl and BaseUrlProvider
Add the concept of a `BaseUrl` to the core `spring-boot-test`
module for use when making test HTTP calls. The web server module
provides `BaseUrlProvider` implementations that provide the actual
base URL (usually `https://localhost:<local-server-port>`).

Test utilities will be able to use `BaseUrlProviders` to find the
`BaseUrl`.

See gh-46356
2025-10-01 21:46:28 -07:00
Phillip WebbandMoritz Halbritter 239f384ac0 Update PropertyMapper to better support nullability
Refactor `PropertyMapper` so that it no longer calls adapter or
predicate methods by default when the source value is `null`. This
effectively makes all default calls the same as using
`alwaysWhenNotNull` in the previous generation of the code.

For the limited times when you do need to deal with `null` values, the
new `always()` method can be used.

For example,

	map.from(source::method).to(destination::method);

Will not call `destination.method(...)` if `source.method()` returns
`null`.

Where as:

	map.from(source::method).always().to(destination::method);

Will call  `destination.method(null)` if `source.method()` returns
`null`.

This update provides clearer semantics for the API and allows for better
JSpecify nullability annotations. It has also simplified much of our
existing property mapper code.

Closes gh-47024

Co-authored-by: Moritz Halbritter <moritz.halbritter@broadcom.com>
2025-09-05 14:43:33 -07:00
Andy Wilkinson b1b5880f48 Merge branch '3.5.x'
Closes gh-47036
2025-09-04 09:56:46 +01:00
Moritz Halbritter 76157c77fa Improve null-safety of module/spring-boot-web-server
See gh-46926
2025-08-26 14:22:56 +02:00
Andy Wilkinson 37342aff69 Merge branch '3.5.x'
Closes gh-46923
2025-08-20 11:32:02 +01:00
Brian Clozel 8c0051a02e Drop Undertow support
Spring Framework 7.0 requires a Servlet 6.1 baseline for Servlet containers.

Partial Servlet 6.1 support is available on the `main` Undertow branch,
but there isn't any milestone version available for the undertow 2.4
generation. At this stage of our 4.0 schedule, we think it's safer to drop
Undertow support now.

Closes: gh-46917
2025-08-20 09:30:40 +02:00
Moritz Halbritter f82da9777b Add more nullability annotations to module/spring-boot-web-server
See gh-46587
2025-08-06 10:13:38 +02:00
Andy Wilkinson d0dd8c86c6 Prevent pausing of the web server 2025-08-05 10:33:47 +01:00
Moritz Halbritter 0efeea69d0 Add more nullability annotations to module/spring-boot-web-server
See gh-46587
2025-08-05 09:39:25 +02:00
Moritz Halbritter e30cad418a Add nullability annotations to module/spring-boot-web-server
See gh-46587
2025-08-04 11:27:41 +02:00
Phillip Webb decc32dde3 Restructure project directories to better fit Gradle
Closes gh-46358
2025-07-10 17:54:08 -07:00