接口 MockRestServiceServer.MockRestServiceServerBuilder
public static interface MockRestServiceServer.MockRestServiceServerBuilder
Builder to create aMockRestServiceServer
.
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 MockRestServiceServer.MockRestServiceServerBuilder
bufferContent()
Use theBufferingClientHttpRequestFactory
wrapper to buffer the input and output streams, and for example, allow multiple reads of the response body.MockRestServiceServer
build()
Build theMockRestServiceServer
and set up the underlyingRestTemplate
orAsyncRestTemplate
with aClientHttpRequestFactory
that creates mock requests.MockRestServiceServer
build(RequestExpectationManager manager)
An overloaded build alternative that accepts a customRequestExpectationManager
.MockRestServiceServer.MockRestServiceServerBuilder
ignoreExpectOrder(boolean ignoreExpectOrder)
Whether to allow expected requests to be executed in any order not necessarily matching the order of declaration.
方法详细资料
ignoreExpectOrder
MockRestServiceServer.MockRestServiceServerBuilder ignoreExpectOrder(boolean ignoreExpectOrder)
Whether to allow expected requests to be executed in any order not necessarily matching the order of declaration.Effectively a shortcut for:
builder.build(new UnorderedRequestExpectationManager)
.By default this is set to
false
- 参数:
ignoreExpectOrder
- whether to ignore the order of expectations
bufferContent
MockRestServiceServer.MockRestServiceServerBuilder bufferContent()
Use theBufferingClientHttpRequestFactory
wrapper to buffer the input and output streams, and for example, allow multiple reads of the response body.- 从以下版本开始:
- 5.0.5
build
MockRestServiceServer build()
Build theMockRestServiceServer
and set up the underlyingRestTemplate
orAsyncRestTemplate
with aClientHttpRequestFactory
that creates mock requests.
build
MockRestServiceServer build(RequestExpectationManager manager)
An overloaded build alternative that accepts a customRequestExpectationManager
.