Polish "Document how to parameterize REST Docs' output dir with WebTestClient"
See gh-27755
This commit is contained in:
@@ -8063,14 +8063,12 @@ If you require more control over Spring REST Docs configuration than offered by
|
||||
include::{code-examples}/test/autoconfigure/restdocs/webclient/AdvancedConfigurationExample.java[tag=configuration]
|
||||
----
|
||||
|
||||
If you want to make use of Spring REST Docs support for a parameterized output directory, you can create a `WebTestClientBuilderCustomizer` bean.
|
||||
The auto-configuration calls this `WebTestClientBuilderCustomizer` in order to create the `WebTestClient` bean for the current context
|
||||
with the consumer provided in the parameter of the method `entityExchangeResultConsumer`.
|
||||
The following example shows a `WebTestClientBuilderCustomizer` being defined:
|
||||
If you want to make use of Spring REST Docs support for a parameterized output directory, you can use a `WebTestClientBuilderCustomizer` to configure a consumer for every entity exchange result.
|
||||
The following example shows such a `WebTestClientBuilderCustomizer` being defined:
|
||||
|
||||
[source,java,indent=0,subs="verbatim"]
|
||||
[source,java,indent=0]
|
||||
----
|
||||
include::{code-examples}/test/autoconfigure/restdocs/webclient/MyWebTestClientBuilderCustomizerConfiguration.java[]
|
||||
include::{code-examples}/test/autoconfigure/restdocs/webclient/ParameterizedOutputConfigurationExample.java[tag=configuration]
|
||||
----
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user