Commit Graph
11 Commits
Author SHA1 Message Date
Andy Wilkinson 23903925c5 Merge branch '3.5.x' into 4.0.x
Closes gh-49344
2026-02-27 12:13:03 +00:00
Andy Wilkinson 9bd1a460a1 Correct packaging of test code
Closes gh-48699
2026-01-08 11:43:43 +00:00
Stéphane Nicoll 724f706f34 Move auto-configuration for WebTestClient in autoconfigure
Closes gh-47892
2025-10-31 12:05:25 +01:00
Andy Wilkinson c069e924fc Fix codec customization with AutoConfigureWebTestClient
Fixes gh-47697
2025-10-21 12:37:15 +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 b0f503c24c Add nullability annotations to tests in module/spring-boot-webtestclient
See gh-47263
2025-10-16 11:24:41 +02:00
Stéphane Nicoll 9bd5c1a3c2 Polish "Bind WebTestClient to the default WebHandler"
See gh-47617
2025-10-14 11:33:43 +02:00
Moritz Halbritter 285afe2040 Fix checkstyle 2025-10-14 11:09:55 +02:00
Stéphane Nicoll 879b7e6cce Bind WebTestClient to the default WebHandler
Previously, if multiple WebHandler beans were present, the auto-config
for WebTestClient fail to identify a suitable candidate as it expects
to only have such a bean.

This commit updates the logic to look for a well-known bean name that
WebFlux uses, and clarify the exception message to state that a bean
with a given name is expected to be found.

The exception message has been further refined to mention that, if
such a bean is not present, then a MockMVc-compatible ApplicationContext
should be available (i.e. WebApplicationContext).

Closes gh-47617
2025-10-14 11:00:49 +02:00
Andy WilkinsonandPhillip Webb 9eb05ebb10 Create spring-boot-resttestclient and spring-boot-webtestclient modules
Create `spring-boot-resttestclient` and `spring-boot-webtestclient`
modules to hold test client auto-configuration and `TestRestTemplate`
code.

Previous these classes were contained in `spring-boot-resetclient-test`
and `spring-boot-webclient-test` which was incorrect since the `-test`
modules should hold code need to test the given modules, not supporting
test classes.

See gh-46356

Co-authored-by: Phillip Webb <phil.webb@broadcom.com>
2025-10-09 22:12:39 -07:00