Commit Graph

8 Commits

Author SHA1 Message Date
Andy Wilkinson c069e924fc Fix codec customization with AutoConfigureWebTestClient
Build and Deploy Snapshot / Build and Deploy Snapshot (push) Waiting to run Details
Build and Deploy Snapshot / Trigger Docs Build (push) Blocked by required conditions Details
Build and Deploy Snapshot / Verify (push) Blocked by required conditions Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:25], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:25], map[id:windows-latest name:Windows]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:17], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:17], map[id:windows-latest name:Windows]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:21], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:21], map[id:windows-latest name:Windows]) (push) Waiting to run Details
Run CodeQL Analysis / run-analysis (push) Waiting to run Details
Run System Tests / Java ${{ matrix.java.version}} (map[toolchain:true version:17]) (push) Waiting to run Details
Run System Tests / Java ${{ matrix.java.version}} (map[toolchain:true version:21]) (push) Waiting to run Details
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"
Build and Deploy Snapshot / Build and Deploy Snapshot (push) Waiting to run Details
Build and Deploy Snapshot / Trigger Docs Build (push) Blocked by required conditions Details
Build and Deploy Snapshot / Verify (push) Blocked by required conditions Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:25], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:25], map[id:windows-latest name:Windows]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:17], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:17], map[id:windows-latest name:Windows]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:21], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:21], map[id:windows-latest name:Windows]) (push) Waiting to run Details
Run CodeQL Analysis / run-analysis (push) Waiting to run Details
Run System Tests / Java ${{ matrix.java.version}} (map[toolchain:true version:17]) (push) Waiting to run Details
Run System Tests / Java ${{ matrix.java.version}} (map[toolchain:true version:21]) (push) Waiting to run Details
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 Wilkinson 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