Annotation Interface AutoConfigureMockRestServiceServer
@Target(TYPE)
@Retention(RUNTIME)
@Documented
@Inherited
@ImportAutoConfiguration
@PropertyMapping("spring.test.webclient.mockrestserviceserver")
public @interface AutoConfigureMockRestServiceServer
Annotation that can be applied to a test class to enable and configure
auto-configuration of a single 
MockRestServiceServer. Only useful when a single
call is made to RestTemplateBuilder or RestClient.Builder. If
multiple RestTemplates or
RestClients are in use, inject a
MockServerRestTemplateCustomizer and use
getServer(RestTemplate), or inject a MockServerRestClientCustomizer and use
* getServer(RestClient.Builder), or bind a MockRestServiceServer directly.- Since:
- 4.0.0
- Author:
- Phillip Webb, Scott Frederick
- See Also:
- 
Optional Element SummaryOptional ElementsModifier and TypeOptional ElementDescriptionbooleanIfMockServerRestTemplateCustomizerandMockServerRestClientCustomizershould be enabled andMockRestServiceServerbeans should be registered.
- 
Element Details- 
enabledboolean enabledIfMockServerRestTemplateCustomizerandMockServerRestClientCustomizershould be enabled andMockRestServiceServerbeans should be registered. Defaults totrue- Returns:
- if mock support is enabled
 - Default:
- true
 
 
-