Support customization of WebTestClient.Builder when using @SpringBootTest

Closes gh-15132
This commit is contained in:
Andy Wilkinson
2019-09-23 12:45:16 +01:00
parent 100fc8cf2c
commit 96f85a40de
7 changed files with 74 additions and 7 deletions

View File

@@ -6052,6 +6052,13 @@ include::{code-examples}/test/web/RandomPortTestRestTemplateExampleTests.java[ta
[[boot-features-testing-spring-boot-applications-customizing-web-test-client]]
==== Customizing WebTestClient
To customize the `WebTestClient` bean, configure a `WebTestClientBuilderCustomizer` bean.
Any such beans are called with the `WebTestClient.Builder` that is used to create the `WebTestClient`.
[[boot-features-testing-spring-boot-applications-jmx]]
==== Using JMX
As the test context framework caches context, JMX is disabled by default to prevent identical components to register on the same domain.