Class MockServerWebExchange.Builder
java.lang.Object
org.springframework.mock.web.server.MockServerWebExchange.Builder
- Enclosing class:
- MockServerWebExchange
Builder for a
MockServerWebExchange
.- Since:
- 5.1
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapplicationContext
(ApplicationContext applicationContext) Provide theApplicationContext
to expose through the exchange.build()
Build theMockServerWebExchange
instance.session
(WebSession session) Set the session to use for the exchange.sessionManager
(WebSessionManager sessionManager) Provide aWebSessionManager
instance to use with the exchange.
-
Constructor Details
-
Builder
-
-
Method Details
-
session
Set the session to use for the exchange.This method is mutually exclusive with
sessionManager(WebSessionManager)
.- Parameters:
session
- the session to use- See Also:
-
sessionManager
Provide aWebSessionManager
instance to use with the exchange.This is mutually exclusive with
session(WebSession)
.- Parameters:
sessionManager
- the session manager to use
-
applicationContext
Provide theApplicationContext
to expose through the exchange.- Parameters:
applicationContext
- the context to use- Since:
- 6.2.5
-
build
Build theMockServerWebExchange
instance.
-