This commit makes the following changes:
- Merge WebClient into ExchangeFunction. Static methods on WebClient
have been moved to the utility class ExchangeFunctions, similar to
RouterFunctions operates on the server side.
- Renamed WebClientOperations to WebClient.
- Renamed WebClientStrategies to ExchangeStrategies
This commit removes the use of SocketUtils#findAvailableTcpPort in
favor of letting servers pick a dynamic port by specifying port 0.
This should make integration tests more stable because the port is
chosen at the place where it needs to be used. It gives servers a
chance to try to open a socket on some port and start using the socket
if successful.
This commit *adds* the "intercepted" headers to the ClientHttpRequest,
as opposed to replacing them, which is what happened before this commit.
Issue: SPR-15166
Following on the introduction of the UriBuilderFactory and its
DefaultUriBuilderFactory implementation, this commit deprecates
DefaultUriTemplate (and AbstractUriTemplateHandler).
The new DefaultUriBuilderFactory has comparable functionality and is
more flexible but cannot be merged into the existing hierarchy and
be backwards compatible with regards to protected methods.
Issue: SPR-15124
Following on the introduction of WebClientOperations in the last commit
this commit removes the HTTP method specific factory methods and also
scales back the builder options in ClientRequest.
ClientRequest is now expected to be used mainly from an
ExchangeFilterFunction which may modify the ClientRequest using the
from(ClientRequest) entry point rather creating from scratch.
Issue: SPR-15124
Due to the static nature of JUnit parameterized test inputs, an
HttpServer instance is re-used for all tests per test class.
This commit adds lifecycle handling to AbstractHttpServer with a
lifecycle monitor to ensure test server fields are properly
initialized and reset after each test .
Introduce separate adapters TomcatHttpHandlerAdapter/JettyHttpHandlerAdapter
so that each adapter can use the Tomcat/Jetty APIs for reading/writing
with ByteBuffer.
Failures in JettySockJsIntegrationTests after the upgrade to 9.4 were
hidden due to the PERFORMANCE test group but were failing on the CI
performance build with IllegalStateException inside Jetty on
"Failure find the required ServletContext attribute
org.eclipse.jetty.util.DecoratedObjectFactory".