diff --git a/spring-web/src/main/java/org/springframework/http/codec/BodyExtractor.java b/spring-web-reactive/src/main/java/org/springframework/web/reactive/function/BodyExtractor.java similarity index 93% rename from spring-web/src/main/java/org/springframework/http/codec/BodyExtractor.java rename to spring-web-reactive/src/main/java/org/springframework/web/reactive/function/BodyExtractor.java index 79d0f23392..9ced229e50 100644 --- a/spring-web/src/main/java/org/springframework/http/codec/BodyExtractor.java +++ b/spring-web-reactive/src/main/java/org/springframework/web/reactive/function/BodyExtractor.java @@ -14,12 +14,13 @@ * limitations under the License. */ -package org.springframework.http.codec; +package org.springframework.web.reactive.function; import java.util.function.Supplier; import java.util.stream.Stream; import org.springframework.http.ReactiveHttpInputMessage; +import org.springframework.http.codec.HttpMessageReader; /** * A function that can extract data from a {@link ReactiveHttpInputMessage} body. diff --git a/spring-web/src/main/java/org/springframework/http/codec/BodyExtractors.java b/spring-web-reactive/src/main/java/org/springframework/web/reactive/function/BodyExtractors.java similarity index 96% rename from spring-web/src/main/java/org/springframework/http/codec/BodyExtractors.java rename to spring-web-reactive/src/main/java/org/springframework/web/reactive/function/BodyExtractors.java index affe991c68..fd7a0f782b 100644 --- a/spring-web/src/main/java/org/springframework/http/codec/BodyExtractors.java +++ b/spring-web-reactive/src/main/java/org/springframework/web/reactive/function/BodyExtractors.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.http.codec; +package org.springframework.web.reactive.function; import java.util.Collections; import java.util.List; @@ -32,6 +32,8 @@ import org.springframework.core.io.buffer.DataBuffer; import org.springframework.http.HttpMessage; import org.springframework.http.MediaType; import org.springframework.http.ReactiveHttpInputMessage; +import org.springframework.http.codec.HttpMessageReader; +import org.springframework.http.codec.UnsupportedMediaTypeException; import org.springframework.util.Assert; /** diff --git a/spring-web/src/main/java/org/springframework/http/codec/BodyInserter.java b/spring-web-reactive/src/main/java/org/springframework/web/reactive/function/BodyInserter.java similarity index 93% rename from spring-web/src/main/java/org/springframework/http/codec/BodyInserter.java rename to spring-web-reactive/src/main/java/org/springframework/web/reactive/function/BodyInserter.java index ac8b032413..5cf02291dd 100644 --- a/spring-web/src/main/java/org/springframework/http/codec/BodyInserter.java +++ b/spring-web-reactive/src/main/java/org/springframework/web/reactive/function/BodyInserter.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.http.codec; +package org.springframework.web.reactive.function; import java.util.function.Supplier; import java.util.stream.Stream; @@ -22,6 +22,7 @@ import java.util.stream.Stream; import reactor.core.publisher.Mono; import org.springframework.http.ReactiveHttpOutputMessage; +import org.springframework.http.codec.HttpMessageWriter; /** * A combination of functions that can populate a {@link ReactiveHttpOutputMessage} body. diff --git a/spring-web/src/main/java/org/springframework/http/codec/BodyInserters.java b/spring-web-reactive/src/main/java/org/springframework/web/reactive/function/BodyInserters.java similarity index 97% rename from spring-web/src/main/java/org/springframework/http/codec/BodyInserters.java rename to spring-web-reactive/src/main/java/org/springframework/web/reactive/function/BodyInserters.java index da33391f75..ee40d43919 100644 --- a/spring-web/src/main/java/org/springframework/http/codec/BodyInserters.java +++ b/spring-web-reactive/src/main/java/org/springframework/web/reactive/function/BodyInserters.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.http.codec; +package org.springframework.web.reactive.function; import java.util.Collections; import java.util.List; @@ -30,6 +30,9 @@ import org.springframework.core.io.Resource; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.http.MediaType; import org.springframework.http.ReactiveHttpOutputMessage; +import org.springframework.http.codec.HttpMessageWriter; +import org.springframework.http.codec.ServerSentEvent; +import org.springframework.http.codec.UnsupportedMediaTypeException; import org.springframework.http.server.reactive.ServerHttpResponse; import org.springframework.util.Assert; diff --git a/spring-web-reactive/src/main/java/org/springframework/web/reactive/function/client/ClientRequest.java b/spring-web-reactive/src/main/java/org/springframework/web/reactive/function/client/ClientRequest.java index 3b1a1d52fd..b0dd118617 100644 --- a/spring-web-reactive/src/main/java/org/springframework/web/reactive/function/client/ClientRequest.java +++ b/spring-web-reactive/src/main/java/org/springframework/web/reactive/function/client/ClientRequest.java @@ -27,9 +27,9 @@ import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; import org.springframework.http.MediaType; import org.springframework.http.client.reactive.ClientHttpRequest; -import org.springframework.http.codec.BodyInserter; import org.springframework.util.Assert; import org.springframework.util.MultiValueMap; +import org.springframework.web.reactive.function.BodyInserter; import org.springframework.web.util.DefaultUriTemplateHandler; import org.springframework.web.util.UriTemplateHandler; diff --git a/spring-web-reactive/src/main/java/org/springframework/web/reactive/function/client/ClientResponse.java b/spring-web-reactive/src/main/java/org/springframework/web/reactive/function/client/ClientResponse.java index 70d1bb94d2..8441aec995 100644 --- a/spring-web-reactive/src/main/java/org/springframework/web/reactive/function/client/ClientResponse.java +++ b/spring-web-reactive/src/main/java/org/springframework/web/reactive/function/client/ClientResponse.java @@ -27,7 +27,7 @@ import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.client.reactive.ClientHttpResponse; -import org.springframework.http.codec.BodyExtractor; +import org.springframework.web.reactive.function.BodyExtractor; /** * Represents an HTTP response, as returned by the {@link WebClient}. diff --git a/spring-web-reactive/src/main/java/org/springframework/web/reactive/function/client/DefaultClientRequestBuilder.java b/spring-web-reactive/src/main/java/org/springframework/web/reactive/function/client/DefaultClientRequestBuilder.java index bfa28d3069..86adb1ae1a 100644 --- a/spring-web-reactive/src/main/java/org/springframework/web/reactive/function/client/DefaultClientRequestBuilder.java +++ b/spring-web-reactive/src/main/java/org/springframework/web/reactive/function/client/DefaultClientRequestBuilder.java @@ -33,13 +33,13 @@ import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; import org.springframework.http.MediaType; import org.springframework.http.client.reactive.ClientHttpRequest; -import org.springframework.http.codec.BodyInserter; -import org.springframework.http.codec.BodyInserters; import org.springframework.http.codec.HttpMessageWriter; import org.springframework.util.Assert; import org.springframework.util.CollectionUtils; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; +import org.springframework.web.reactive.function.BodyInserter; +import org.springframework.web.reactive.function.BodyInserters; /** * Default implementation of {@link ClientRequest.BodyBuilder}. diff --git a/spring-web-reactive/src/main/java/org/springframework/web/reactive/function/client/DefaultClientResponse.java b/spring-web-reactive/src/main/java/org/springframework/web/reactive/function/client/DefaultClientResponse.java index c5db40c700..4b545996b5 100644 --- a/spring-web-reactive/src/main/java/org/springframework/web/reactive/function/client/DefaultClientResponse.java +++ b/spring-web-reactive/src/main/java/org/springframework/web/reactive/function/client/DefaultClientResponse.java @@ -32,9 +32,9 @@ import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.client.reactive.ClientHttpResponse; -import org.springframework.http.codec.BodyExtractor; -import org.springframework.http.codec.BodyExtractors; import org.springframework.http.codec.HttpMessageReader; +import org.springframework.web.reactive.function.BodyExtractor; +import org.springframework.web.reactive.function.BodyExtractors; /** * Default implementation of {@link ClientResponse}. diff --git a/spring-web-reactive/src/main/java/org/springframework/web/reactive/function/server/DefaultServerRequest.java b/spring-web-reactive/src/main/java/org/springframework/web/reactive/function/server/DefaultServerRequest.java index 39b240420e..4aa8ff97f7 100644 --- a/spring-web-reactive/src/main/java/org/springframework/web/reactive/function/server/DefaultServerRequest.java +++ b/spring-web-reactive/src/main/java/org/springframework/web/reactive/function/server/DefaultServerRequest.java @@ -34,11 +34,11 @@ import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; import org.springframework.http.HttpRange; import org.springframework.http.MediaType; -import org.springframework.http.codec.BodyExtractor; -import org.springframework.http.codec.BodyExtractors; import org.springframework.http.codec.HttpMessageReader; import org.springframework.http.server.reactive.ServerHttpRequest; import org.springframework.util.Assert; +import org.springframework.web.reactive.function.BodyExtractor; +import org.springframework.web.reactive.function.BodyExtractors; import org.springframework.web.server.ServerWebExchange; /** diff --git a/spring-web-reactive/src/main/java/org/springframework/web/reactive/function/server/DefaultServerResponseBuilder.java b/spring-web-reactive/src/main/java/org/springframework/web/reactive/function/server/DefaultServerResponseBuilder.java index 2bc89b6096..8e4a46a733 100644 --- a/spring-web-reactive/src/main/java/org/springframework/web/reactive/function/server/DefaultServerResponseBuilder.java +++ b/spring-web-reactive/src/main/java/org/springframework/web/reactive/function/server/DefaultServerResponseBuilder.java @@ -42,12 +42,12 @@ import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; -import org.springframework.http.codec.BodyInserter; -import org.springframework.http.codec.BodyInserters; import org.springframework.http.codec.HttpMessageWriter; import org.springframework.http.server.reactive.ServerHttpResponse; import org.springframework.util.Assert; import org.springframework.util.ObjectUtils; +import org.springframework.web.reactive.function.BodyInserter; +import org.springframework.web.reactive.function.BodyInserters; import org.springframework.web.reactive.result.view.ViewResolver; import org.springframework.web.server.ServerWebExchange; diff --git a/spring-web-reactive/src/main/java/org/springframework/web/reactive/function/server/RequestPredicates.java b/spring-web-reactive/src/main/java/org/springframework/web/reactive/function/server/RequestPredicates.java index 3c354a2eb7..457f6ad217 100644 --- a/spring-web-reactive/src/main/java/org/springframework/web/reactive/function/server/RequestPredicates.java +++ b/spring-web-reactive/src/main/java/org/springframework/web/reactive/function/server/RequestPredicates.java @@ -30,11 +30,11 @@ import reactor.core.publisher.Mono; import org.springframework.http.HttpMethod; import org.springframework.http.MediaType; -import org.springframework.http.codec.BodyExtractor; import org.springframework.http.server.reactive.ServerHttpRequest; import org.springframework.util.AntPathMatcher; import org.springframework.util.Assert; import org.springframework.util.PathMatcher; +import org.springframework.web.reactive.function.BodyExtractor; /** * Implementations of {@link RequestPredicate} that implement various useful request matching operations, such as diff --git a/spring-web-reactive/src/main/java/org/springframework/web/reactive/function/server/ResourceHandlerFunction.java b/spring-web-reactive/src/main/java/org/springframework/web/reactive/function/server/ResourceHandlerFunction.java index 571145c435..d6ad9b8f9d 100644 --- a/spring-web-reactive/src/main/java/org/springframework/web/reactive/function/server/ResourceHandlerFunction.java +++ b/spring-web-reactive/src/main/java/org/springframework/web/reactive/function/server/ResourceHandlerFunction.java @@ -30,7 +30,7 @@ import reactor.core.publisher.Mono; import org.springframework.core.io.Resource; import org.springframework.http.HttpMethod; import org.springframework.http.HttpStatus; -import org.springframework.http.codec.BodyInserters; +import org.springframework.web.reactive.function.BodyInserters; /** * @author Arjen Poutsma diff --git a/spring-web-reactive/src/main/java/org/springframework/web/reactive/function/server/ServerRequest.java b/spring-web-reactive/src/main/java/org/springframework/web/reactive/function/server/ServerRequest.java index e86b804a12..67555627cf 100644 --- a/spring-web-reactive/src/main/java/org/springframework/web/reactive/function/server/ServerRequest.java +++ b/spring-web-reactive/src/main/java/org/springframework/web/reactive/function/server/ServerRequest.java @@ -31,8 +31,8 @@ import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; import org.springframework.http.HttpRange; import org.springframework.http.MediaType; -import org.springframework.http.codec.BodyExtractor; import org.springframework.http.server.reactive.ServerHttpRequest; +import org.springframework.web.reactive.function.BodyExtractor; /** * Represents a server-side HTTP request, as handled by a {@code HandlerFunction}. diff --git a/spring-web-reactive/src/main/java/org/springframework/web/reactive/function/server/ServerResponse.java b/spring-web-reactive/src/main/java/org/springframework/web/reactive/function/server/ServerResponse.java index 1dfe579956..874556b2a9 100644 --- a/spring-web-reactive/src/main/java/org/springframework/web/reactive/function/server/ServerResponse.java +++ b/spring-web-reactive/src/main/java/org/springframework/web/reactive/function/server/ServerResponse.java @@ -31,10 +31,10 @@ import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; -import org.springframework.http.codec.BodyInserter; -import org.springframework.http.codec.BodyInserters; import org.springframework.http.server.reactive.ServerHttpResponse; import org.springframework.util.Assert; +import org.springframework.web.reactive.function.BodyInserter; +import org.springframework.web.reactive.function.BodyInserters; import org.springframework.web.server.ServerWebExchange; /** diff --git a/spring-web-reactive/src/main/java/org/springframework/web/reactive/function/server/support/ServerRequestWrapper.java b/spring-web-reactive/src/main/java/org/springframework/web/reactive/function/server/support/ServerRequestWrapper.java index 577cff73e5..eef7f39b56 100644 --- a/spring-web-reactive/src/main/java/org/springframework/web/reactive/function/server/support/ServerRequestWrapper.java +++ b/spring-web-reactive/src/main/java/org/springframework/web/reactive/function/server/support/ServerRequestWrapper.java @@ -31,9 +31,9 @@ import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; import org.springframework.http.HttpRange; import org.springframework.http.MediaType; -import org.springframework.http.codec.BodyExtractor; import org.springframework.http.server.reactive.ServerHttpRequest; import org.springframework.util.Assert; +import org.springframework.web.reactive.function.BodyExtractor; import org.springframework.web.reactive.function.server.HandlerFunction; import org.springframework.web.reactive.function.server.ServerRequest; diff --git a/spring-web-reactive/src/test/java/org/springframework/web/reactive/FlushingIntegrationTests.java b/spring-web-reactive/src/test/java/org/springframework/web/reactive/FlushingIntegrationTests.java index d2a3f776eb..c25b89c038 100644 --- a/spring-web-reactive/src/test/java/org/springframework/web/reactive/FlushingIntegrationTests.java +++ b/spring-web-reactive/src/test/java/org/springframework/web/reactive/FlushingIntegrationTests.java @@ -29,12 +29,12 @@ import reactor.test.StepVerifier; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DataBufferFactory; import org.springframework.http.client.reactive.ReactorClientHttpConnector; -import org.springframework.http.codec.BodyExtractors; import org.springframework.http.server.reactive.AbstractHttpHandlerIntegrationTests; import org.springframework.http.server.reactive.HttpHandler; import org.springframework.http.server.reactive.ServerHttpRequest; import org.springframework.http.server.reactive.ServerHttpResponse; import org.springframework.util.Assert; +import org.springframework.web.reactive.function.BodyExtractors; import org.springframework.web.reactive.function.client.ClientRequest; import org.springframework.web.reactive.function.client.WebClient; diff --git a/spring-web/src/test/java/org/springframework/http/codec/BodyExtractorsTests.java b/spring-web-reactive/src/test/java/org/springframework/web/reactive/function/BodyExtractorsTests.java similarity index 95% rename from spring-web/src/test/java/org/springframework/http/codec/BodyExtractorsTests.java rename to spring-web-reactive/src/test/java/org/springframework/web/reactive/function/BodyExtractorsTests.java index 74e829471d..7e55c751cb 100644 --- a/spring-web/src/test/java/org/springframework/http/codec/BodyExtractorsTests.java +++ b/spring-web-reactive/src/test/java/org/springframework/web/reactive/function/BodyExtractorsTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.http.codec; +package org.springframework.web.reactive.function; import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; @@ -36,6 +36,9 @@ import org.springframework.core.io.buffer.DefaultDataBuffer; import org.springframework.core.io.buffer.DefaultDataBufferFactory; import org.springframework.http.MediaType; import org.springframework.http.ReactiveHttpInputMessage; +import org.springframework.http.codec.DecoderHttpMessageReader; +import org.springframework.http.codec.HttpMessageReader; +import org.springframework.http.codec.UnsupportedMediaTypeException; import org.springframework.http.codec.json.Jackson2JsonDecoder; import org.springframework.http.codec.xml.Jaxb2XmlDecoder; import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; diff --git a/spring-web/src/test/java/org/springframework/http/codec/BodyInsertersTests.java b/spring-web-reactive/src/test/java/org/springframework/web/reactive/function/BodyInsertersTests.java similarity index 94% rename from spring-web/src/test/java/org/springframework/http/codec/BodyInsertersTests.java rename to spring-web-reactive/src/test/java/org/springframework/web/reactive/function/BodyInsertersTests.java index 582b6b1a23..a7bff55b38 100644 --- a/spring-web/src/test/java/org/springframework/http/codec/BodyInsertersTests.java +++ b/spring-web-reactive/src/test/java/org/springframework/web/reactive/function/BodyInsertersTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.http.codec; +package org.springframework.web.reactive.function; import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; @@ -39,6 +39,11 @@ import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DefaultDataBuffer; import org.springframework.core.io.buffer.DefaultDataBufferFactory; import org.springframework.http.ReactiveHttpOutputMessage; +import org.springframework.http.codec.EncoderHttpMessageWriter; +import org.springframework.http.codec.HttpMessageWriter; +import org.springframework.http.codec.ResourceHttpMessageWriter; +import org.springframework.http.codec.ServerSentEvent; +import org.springframework.http.codec.ServerSentEventHttpMessageWriter; import org.springframework.http.codec.json.Jackson2JsonEncoder; import org.springframework.http.codec.xml.Jaxb2XmlEncoder; import org.springframework.http.server.reactive.ServerHttpResponse; diff --git a/spring-web-reactive/src/test/java/org/springframework/web/reactive/function/client/DefaultClientRequestBuilderTests.java b/spring-web-reactive/src/test/java/org/springframework/web/reactive/function/client/DefaultClientRequestBuilderTests.java index 33e5f23c81..79954169df 100644 --- a/spring-web-reactive/src/test/java/org/springframework/web/reactive/function/client/DefaultClientRequestBuilderTests.java +++ b/spring-web-reactive/src/test/java/org/springframework/web/reactive/function/client/DefaultClientRequestBuilderTests.java @@ -34,10 +34,10 @@ import org.springframework.core.io.buffer.DefaultDataBufferFactory; import org.springframework.http.HttpMethod; import org.springframework.http.MediaType; import org.springframework.http.client.reactive.ClientHttpRequest; -import org.springframework.http.codec.BodyInserter; import org.springframework.http.codec.EncoderHttpMessageWriter; import org.springframework.http.codec.HttpMessageWriter; import org.springframework.web.client.reactive.test.MockClientHttpRequest; +import org.springframework.web.reactive.function.BodyInserter; import static java.nio.charset.StandardCharsets.UTF_8; import static org.junit.Assert.assertEquals; diff --git a/spring-web-reactive/src/test/java/org/springframework/web/reactive/function/client/DefaultClientResponseTests.java b/spring-web-reactive/src/test/java/org/springframework/web/reactive/function/client/DefaultClientResponseTests.java index 3ae9183c8c..49ef89f9d8 100644 --- a/spring-web-reactive/src/test/java/org/springframework/web/reactive/function/client/DefaultClientResponseTests.java +++ b/spring-web-reactive/src/test/java/org/springframework/web/reactive/function/client/DefaultClientResponseTests.java @@ -46,7 +46,7 @@ import org.springframework.http.codec.HttpMessageReader; import static org.junit.Assert.assertEquals; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -import static org.springframework.http.codec.BodyExtractors.toMono; +import static org.springframework.web.reactive.function.BodyExtractors.toMono; /** * @author Arjen Poutsma diff --git a/spring-web-reactive/src/test/java/org/springframework/web/reactive/function/client/WebClientIntegrationTests.java b/spring-web-reactive/src/test/java/org/springframework/web/reactive/function/client/WebClientIntegrationTests.java index 455b6bf52c..8cfc60dab9 100644 --- a/spring-web-reactive/src/test/java/org/springframework/web/reactive/function/client/WebClientIntegrationTests.java +++ b/spring-web-reactive/src/test/java/org/springframework/web/reactive/function/client/WebClientIntegrationTests.java @@ -35,14 +35,14 @@ import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.client.reactive.ReactorClientHttpConnector; -import org.springframework.http.codec.BodyExtractors; -import org.springframework.http.codec.BodyInserters; import org.springframework.http.codec.Pojo; +import org.springframework.web.reactive.function.BodyExtractors; +import org.springframework.web.reactive.function.BodyInserters; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertThat; -import static org.springframework.http.codec.BodyExtractors.toFlux; -import static org.springframework.http.codec.BodyExtractors.toMono; +import static org.springframework.web.reactive.function.BodyExtractors.toFlux; +import static org.springframework.web.reactive.function.BodyExtractors.toMono; /** * {@link WebClient} integration tests with the {@code Flux} and {@code Mono} API. diff --git a/spring-web-reactive/src/test/java/org/springframework/web/reactive/function/server/DefaultServerRequestTests.java b/spring-web-reactive/src/test/java/org/springframework/web/reactive/function/server/DefaultServerRequestTests.java index c558bf16d1..324bc14aad 100644 --- a/spring-web-reactive/src/test/java/org/springframework/web/reactive/function/server/DefaultServerRequestTests.java +++ b/spring-web-reactive/src/test/java/org/springframework/web/reactive/function/server/DefaultServerRequestTests.java @@ -52,7 +52,7 @@ import org.springframework.web.server.ServerWebExchange; import static org.junit.Assert.assertEquals; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -import static org.springframework.http.codec.BodyExtractors.toMono; +import static org.springframework.web.reactive.function.BodyExtractors.toMono; /** * @author Arjen Poutsma diff --git a/spring-web-reactive/src/test/java/org/springframework/web/reactive/function/server/DispatcherHandlerIntegrationTests.java b/spring-web-reactive/src/test/java/org/springframework/web/reactive/function/server/DispatcherHandlerIntegrationTests.java index 8c2685b8bd..ebca9d11b0 100644 --- a/spring-web-reactive/src/test/java/org/springframework/web/reactive/function/server/DispatcherHandlerIntegrationTests.java +++ b/spring-web-reactive/src/test/java/org/springframework/web/reactive/function/server/DispatcherHandlerIntegrationTests.java @@ -48,8 +48,8 @@ import org.springframework.web.reactive.result.view.ViewResolver; import org.springframework.web.server.adapter.WebHttpHandlerBuilder; import static org.junit.Assert.assertEquals; -import static org.springframework.http.codec.BodyInserters.fromObject; -import static org.springframework.http.codec.BodyInserters.fromPublisher; +import static org.springframework.web.reactive.function.BodyInserters.fromObject; +import static org.springframework.web.reactive.function.BodyInserters.fromPublisher; import static org.springframework.web.reactive.function.server.RouterFunctions.route; /** diff --git a/spring-web-reactive/src/test/java/org/springframework/web/reactive/function/server/MockServerRequest.java b/spring-web-reactive/src/test/java/org/springframework/web/reactive/function/server/MockServerRequest.java index 29a14bd717..a886dd51f5 100644 --- a/spring-web-reactive/src/test/java/org/springframework/web/reactive/function/server/MockServerRequest.java +++ b/spring-web-reactive/src/test/java/org/springframework/web/reactive/function/server/MockServerRequest.java @@ -36,11 +36,11 @@ import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; import org.springframework.http.HttpRange; import org.springframework.http.MediaType; -import org.springframework.http.codec.BodyExtractor; import org.springframework.http.server.reactive.ServerHttpRequest; import org.springframework.util.Assert; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; +import org.springframework.web.reactive.function.BodyExtractor; /** * @author Arjen Poutsma diff --git a/spring-web-reactive/src/test/java/org/springframework/web/reactive/function/server/PublisherHandlerFunctionIntegrationTests.java b/spring-web-reactive/src/test/java/org/springframework/web/reactive/function/server/PublisherHandlerFunctionIntegrationTests.java index 4f1da49ff7..311fd190c6 100644 --- a/spring-web-reactive/src/test/java/org/springframework/web/reactive/function/server/PublisherHandlerFunctionIntegrationTests.java +++ b/spring-web-reactive/src/test/java/org/springframework/web/reactive/function/server/PublisherHandlerFunctionIntegrationTests.java @@ -32,8 +32,8 @@ import org.springframework.http.ResponseEntity; import org.springframework.web.client.RestTemplate; import static org.junit.Assert.assertEquals; -import static org.springframework.http.codec.BodyExtractors.toMono; -import static org.springframework.http.codec.BodyInserters.fromPublisher; +import static org.springframework.web.reactive.function.BodyExtractors.toMono; +import static org.springframework.web.reactive.function.BodyInserters.fromPublisher; import static org.springframework.web.reactive.function.server.RequestPredicates.GET; import static org.springframework.web.reactive.function.server.RequestPredicates.POST; import static org.springframework.web.reactive.function.server.RouterFunctions.route; diff --git a/spring-web-reactive/src/test/java/org/springframework/web/reactive/function/server/RouterFunctionTests.java b/spring-web-reactive/src/test/java/org/springframework/web/reactive/function/server/RouterFunctionTests.java index 9c1ec9cadf..ef5f693d70 100644 --- a/spring-web-reactive/src/test/java/org/springframework/web/reactive/function/server/RouterFunctionTests.java +++ b/spring-web-reactive/src/test/java/org/springframework/web/reactive/function/server/RouterFunctionTests.java @@ -21,7 +21,7 @@ import reactor.core.publisher.Mono; import reactor.test.StepVerifier; import static org.junit.Assert.assertNotNull; -import static org.springframework.http.codec.BodyInserters.fromObject; +import static org.springframework.web.reactive.function.BodyInserters.fromObject; /** * @author Arjen Poutsma diff --git a/spring-web-reactive/src/test/java/org/springframework/web/reactive/function/server/SseHandlerFunctionIntegrationTests.java b/spring-web-reactive/src/test/java/org/springframework/web/reactive/function/server/SseHandlerFunctionIntegrationTests.java index 695c1a102c..e95e220ee5 100644 --- a/spring-web-reactive/src/test/java/org/springframework/web/reactive/function/server/SseHandlerFunctionIntegrationTests.java +++ b/spring-web-reactive/src/test/java/org/springframework/web/reactive/function/server/SseHandlerFunctionIntegrationTests.java @@ -26,12 +26,12 @@ import reactor.test.StepVerifier; import org.springframework.http.MediaType; import org.springframework.http.client.reactive.ReactorClientHttpConnector; -import org.springframework.http.codec.BodyExtractors; import org.springframework.http.codec.ServerSentEvent; +import org.springframework.web.reactive.function.BodyExtractors; import org.springframework.web.reactive.function.client.ClientRequest; import org.springframework.web.reactive.function.client.WebClient; -import static org.springframework.http.codec.BodyInserters.fromServerSentEvents; +import static org.springframework.web.reactive.function.BodyInserters.fromServerSentEvents; import static org.springframework.web.reactive.function.server.RouterFunctions.route; /** diff --git a/spring-web-reactive/src/test/java/org/springframework/web/reactive/result/method/annotation/SseIntegrationTests.java b/spring-web-reactive/src/test/java/org/springframework/web/reactive/result/method/annotation/SseIntegrationTests.java index b9d921d2c7..316fb95038 100644 --- a/spring-web-reactive/src/test/java/org/springframework/web/reactive/result/method/annotation/SseIntegrationTests.java +++ b/spring-web-reactive/src/test/java/org/springframework/web/reactive/result/method/annotation/SseIntegrationTests.java @@ -29,7 +29,6 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.http.MediaType; import org.springframework.http.client.reactive.ReactorClientHttpConnector; -import org.springframework.http.codec.BodyExtractors; import org.springframework.http.codec.ServerSentEvent; import org.springframework.http.server.reactive.AbstractHttpHandlerIntegrationTests; import org.springframework.http.server.reactive.HttpHandler; @@ -37,6 +36,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.reactive.DispatcherHandler; import org.springframework.web.reactive.config.EnableWebReactive; +import org.springframework.web.reactive.function.BodyExtractors; import org.springframework.web.reactive.function.client.ClientRequest; import org.springframework.web.reactive.function.client.WebClient; import org.springframework.web.server.adapter.WebHttpHandlerBuilder; diff --git a/spring-web/src/test/resources/org/springframework/http/codec/response.txt b/spring-web-reactive/src/test/resources/org/springframework/web/reactive/function/response.txt similarity index 100% rename from spring-web/src/test/resources/org/springframework/http/codec/response.txt rename to spring-web-reactive/src/test/resources/org/springframework/web/reactive/function/response.txt