From b115f1885d431c5b470b1f469055b70ae08f3af2 Mon Sep 17 00:00:00 2001 From: Sebastien Deleuze Date: Thu, 30 Jun 2016 16:59:08 +0200 Subject: [PATCH] Move JSON and XML codecs to org.springframework.http.codec --- .../support => http/codec/json}/JacksonJsonDecoder.java | 3 ++- .../support => http/codec/json}/JacksonJsonEncoder.java | 3 ++- .../support => http/codec/json}/JsonObjectDecoder.java | 3 ++- .../codec/support => http/codec/xml}/Jaxb2Decoder.java | 3 ++- .../codec/support => http/codec/xml}/Jaxb2Encoder.java | 3 ++- .../support => http/codec/xml}/JaxbContextContainer.java | 2 +- .../codec/support => http/codec/xml}/XmlEventDecoder.java | 3 ++- .../springframework/web/client/reactive/WebClient.java | 4 ++-- .../web/reactive/config/WebReactiveConfiguration.java | 8 ++++---- .../core/codec/support/StringDecoderTests.java | 2 +- .../{core/codec/support => http/codec}/Pojo.java | 2 +- .../support => http/codec}/SseEventEncoderTests.java | 4 ++-- .../codec/json}/JacksonJsonDecoderTests.java | 4 +++- .../codec/json}/JacksonJsonEncoderTests.java | 4 +++- .../codec/json}/JsonObjectDecoderTests.java | 2 +- .../support => http/codec/xml}/Jaxb2DecoderTests.java | 5 ++++- .../support => http/codec/xml}/Jaxb2EncoderTests.java | 3 ++- .../support => http/codec/xml}/XmlEventDecoderTests.java | 3 ++- .../web/client/reactive/WebClientIntegrationTests.java | 2 +- .../web/reactive/config/ViewResolverRegistryTests.java | 2 +- .../reactive/config/WebReactiveConfigurationTests.java | 6 +++--- .../annotation/MessageConverterResultHandlerTests.java | 4 ++-- .../annotation/RequestBodyArgumentResolverTests.java | 2 +- .../method/annotation/RequestMappingIntegrationTests.java | 2 +- .../method/annotation/ResponseBodyResultHandlerTests.java | 4 ++-- .../annotation/ResponseEntityResultHandlerTests.java | 4 ++-- .../result/method/annotation/SseIntegrationTests.java | 4 ++-- .../result/view/HttpMessageConverterViewTests.java | 4 ++-- 28 files changed, 55 insertions(+), 40 deletions(-) rename spring-web-reactive/src/main/java/org/springframework/{core/codec/support => http/codec/json}/JacksonJsonDecoder.java (96%) rename spring-web-reactive/src/main/java/org/springframework/{core/codec/support => http/codec/json}/JacksonJsonEncoder.java (97%) rename spring-web-reactive/src/main/java/org/springframework/{core/codec/support => http/codec/json}/JsonObjectDecoder.java (98%) rename spring-web-reactive/src/main/java/org/springframework/{core/codec/support => http/codec/xml}/Jaxb2Decoder.java (98%) rename spring-web-reactive/src/main/java/org/springframework/{core/codec/support => http/codec/xml}/Jaxb2Encoder.java (95%) rename spring-web-reactive/src/main/java/org/springframework/{core/codec/support => http/codec/xml}/JaxbContextContainer.java (97%) rename spring-web-reactive/src/main/java/org/springframework/{core/codec/support => http/codec/xml}/XmlEventDecoder.java (97%) rename spring-web-reactive/src/test/java/org/springframework/{core/codec/support => http/codec}/Pojo.java (96%) rename spring-web-reactive/src/test/java/org/springframework/{core/codec/support => http/codec}/SseEventEncoderTests.java (98%) rename spring-web-reactive/src/test/java/org/springframework/{core/codec/support => http/codec/json}/JacksonJsonDecoderTests.java (95%) rename spring-web-reactive/src/test/java/org/springframework/{core/codec/support => http/codec/json}/JacksonJsonEncoderTests.java (95%) rename spring-web-reactive/src/test/java/org/springframework/{core/codec/support => http/codec/json}/JsonObjectDecoderTests.java (98%) rename spring-web-reactive/src/test/java/org/springframework/{core/codec/support => http/codec/xml}/Jaxb2DecoderTests.java (97%) rename spring-web-reactive/src/test/java/org/springframework/{core/codec/support => http/codec/xml}/Jaxb2EncoderTests.java (97%) rename spring-web-reactive/src/test/java/org/springframework/{core/codec/support => http/codec/xml}/XmlEventDecoderTests.java (96%) diff --git a/spring-web-reactive/src/main/java/org/springframework/core/codec/support/JacksonJsonDecoder.java b/spring-web-reactive/src/main/java/org/springframework/http/codec/json/JacksonJsonDecoder.java similarity index 96% rename from spring-web-reactive/src/main/java/org/springframework/core/codec/support/JacksonJsonDecoder.java rename to spring-web-reactive/src/main/java/org/springframework/http/codec/json/JacksonJsonDecoder.java index 13d2d7aea22..e5d51005ef5 100644 --- a/spring-web-reactive/src/main/java/org/springframework/core/codec/support/JacksonJsonDecoder.java +++ b/spring-web-reactive/src/main/java/org/springframework/http/codec/json/JacksonJsonDecoder.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.core.codec.support; +package org.springframework.http.codec.json; import java.io.IOException; import java.nio.charset.StandardCharsets; @@ -29,6 +29,7 @@ import reactor.core.publisher.Flux; import org.springframework.core.ResolvableType; import org.springframework.core.codec.CodecException; import org.springframework.core.codec.Decoder; +import org.springframework.core.codec.support.AbstractDecoder; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.support.DataBufferUtils; import org.springframework.util.Assert; diff --git a/spring-web-reactive/src/main/java/org/springframework/core/codec/support/JacksonJsonEncoder.java b/spring-web-reactive/src/main/java/org/springframework/http/codec/json/JacksonJsonEncoder.java similarity index 97% rename from spring-web-reactive/src/main/java/org/springframework/core/codec/support/JacksonJsonEncoder.java rename to spring-web-reactive/src/main/java/org/springframework/http/codec/json/JacksonJsonEncoder.java index 89bdaa9cb7d..69cabc1c0ed 100644 --- a/spring-web-reactive/src/main/java/org/springframework/core/codec/support/JacksonJsonEncoder.java +++ b/spring-web-reactive/src/main/java/org/springframework/http/codec/json/JacksonJsonEncoder.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.core.codec.support; +package org.springframework.http.codec.json; import java.io.IOException; import java.io.OutputStream; @@ -31,6 +31,7 @@ import reactor.core.publisher.Mono; import org.springframework.core.ResolvableType; import org.springframework.core.codec.CodecException; +import org.springframework.core.codec.support.AbstractEncoder; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DataBufferFactory; import org.springframework.util.Assert; diff --git a/spring-web-reactive/src/main/java/org/springframework/core/codec/support/JsonObjectDecoder.java b/spring-web-reactive/src/main/java/org/springframework/http/codec/json/JsonObjectDecoder.java similarity index 98% rename from spring-web-reactive/src/main/java/org/springframework/core/codec/support/JsonObjectDecoder.java rename to spring-web-reactive/src/main/java/org/springframework/http/codec/json/JsonObjectDecoder.java index 15773d7aafa..82b298e847b 100644 --- a/spring-web-reactive/src/main/java/org/springframework/core/codec/support/JsonObjectDecoder.java +++ b/spring-web-reactive/src/main/java/org/springframework/http/codec/json/JsonObjectDecoder.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.core.codec.support; +package org.springframework.http.codec.json; import java.nio.charset.StandardCharsets; import java.util.ArrayList; @@ -28,6 +28,7 @@ import org.reactivestreams.Publisher; import reactor.core.publisher.Flux; import org.springframework.core.ResolvableType; +import org.springframework.core.codec.support.AbstractDecoder; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DataBufferFactory; import org.springframework.core.io.buffer.support.DataBufferUtils; diff --git a/spring-web-reactive/src/main/java/org/springframework/core/codec/support/Jaxb2Decoder.java b/spring-web-reactive/src/main/java/org/springframework/http/codec/xml/Jaxb2Decoder.java similarity index 98% rename from spring-web-reactive/src/main/java/org/springframework/core/codec/support/Jaxb2Decoder.java rename to spring-web-reactive/src/main/java/org/springframework/http/codec/xml/Jaxb2Decoder.java index 0bf14b8c4ba..4054f3b2e16 100644 --- a/spring-web-reactive/src/main/java/org/springframework/core/codec/support/Jaxb2Decoder.java +++ b/spring-web-reactive/src/main/java/org/springframework/http/codec/xml/Jaxb2Decoder.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.core.codec.support; +package org.springframework.http.codec.xml; import java.util.ArrayList; import java.util.List; @@ -36,6 +36,7 @@ import reactor.core.publisher.Mono; import org.springframework.core.ResolvableType; import org.springframework.core.codec.CodecException; +import org.springframework.core.codec.support.AbstractDecoder; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.util.ClassUtils; import org.springframework.util.MimeType; diff --git a/spring-web-reactive/src/main/java/org/springframework/core/codec/support/Jaxb2Encoder.java b/spring-web-reactive/src/main/java/org/springframework/http/codec/xml/Jaxb2Encoder.java similarity index 95% rename from spring-web-reactive/src/main/java/org/springframework/core/codec/support/Jaxb2Encoder.java rename to spring-web-reactive/src/main/java/org/springframework/http/codec/xml/Jaxb2Encoder.java index e99c44d1d2c..b7eb53f8959 100644 --- a/spring-web-reactive/src/main/java/org/springframework/core/codec/support/Jaxb2Encoder.java +++ b/spring-web-reactive/src/main/java/org/springframework/http/codec/xml/Jaxb2Encoder.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.core.codec.support; +package org.springframework.http.codec.xml; import java.io.OutputStream; import java.nio.charset.StandardCharsets; @@ -26,6 +26,7 @@ import javax.xml.bind.annotation.XmlType; import reactor.core.publisher.Flux; import org.springframework.core.ResolvableType; +import org.springframework.core.codec.support.AbstractSingleValueEncoder; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DataBufferFactory; import org.springframework.util.ClassUtils; diff --git a/spring-web-reactive/src/main/java/org/springframework/core/codec/support/JaxbContextContainer.java b/spring-web-reactive/src/main/java/org/springframework/http/codec/xml/JaxbContextContainer.java similarity index 97% rename from spring-web-reactive/src/main/java/org/springframework/core/codec/support/JaxbContextContainer.java rename to spring-web-reactive/src/main/java/org/springframework/http/codec/xml/JaxbContextContainer.java index 46d38ff5ae4..87ec8a4380d 100644 --- a/spring-web-reactive/src/main/java/org/springframework/core/codec/support/JaxbContextContainer.java +++ b/spring-web-reactive/src/main/java/org/springframework/http/codec/xml/JaxbContextContainer.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.core.codec.support; +package org.springframework.http.codec.xml; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; diff --git a/spring-web-reactive/src/main/java/org/springframework/core/codec/support/XmlEventDecoder.java b/spring-web-reactive/src/main/java/org/springframework/http/codec/xml/XmlEventDecoder.java similarity index 97% rename from spring-web-reactive/src/main/java/org/springframework/core/codec/support/XmlEventDecoder.java rename to spring-web-reactive/src/main/java/org/springframework/http/codec/xml/XmlEventDecoder.java index a5b0be0bdbe..7bac139387f 100644 --- a/spring-web-reactive/src/main/java/org/springframework/core/codec/support/XmlEventDecoder.java +++ b/spring-web-reactive/src/main/java/org/springframework/http/codec/xml/XmlEventDecoder.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.core.codec.support; +package org.springframework.http.codec.xml; import java.io.InputStream; import java.util.ArrayList; @@ -35,6 +35,7 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import org.springframework.core.ResolvableType; +import org.springframework.core.codec.support.AbstractDecoder; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.support.DataBufferUtils; import org.springframework.util.ClassUtils; diff --git a/spring-web-reactive/src/main/java/org/springframework/web/client/reactive/WebClient.java b/spring-web-reactive/src/main/java/org/springframework/web/client/reactive/WebClient.java index f38f7b02f83..af50d86d77f 100644 --- a/spring-web-reactive/src/main/java/org/springframework/web/client/reactive/WebClient.java +++ b/spring-web-reactive/src/main/java/org/springframework/web/client/reactive/WebClient.java @@ -26,8 +26,8 @@ import org.springframework.core.codec.Decoder; import org.springframework.core.codec.Encoder; import org.springframework.core.codec.support.ByteBufferDecoder; import org.springframework.core.codec.support.ByteBufferEncoder; -import org.springframework.core.codec.support.JacksonJsonDecoder; -import org.springframework.core.codec.support.JacksonJsonEncoder; +import org.springframework.http.codec.json.JacksonJsonDecoder; +import org.springframework.http.codec.json.JacksonJsonEncoder; import org.springframework.core.codec.support.StringDecoder; import org.springframework.core.codec.support.StringEncoder; import org.springframework.http.HttpStatus; diff --git a/spring-web-reactive/src/main/java/org/springframework/web/reactive/config/WebReactiveConfiguration.java b/spring-web-reactive/src/main/java/org/springframework/web/reactive/config/WebReactiveConfiguration.java index f49056c4eb2..a7b10117225 100644 --- a/spring-web-reactive/src/main/java/org/springframework/web/reactive/config/WebReactiveConfiguration.java +++ b/spring-web-reactive/src/main/java/org/springframework/web/reactive/config/WebReactiveConfiguration.java @@ -32,10 +32,10 @@ import org.springframework.core.codec.Decoder; import org.springframework.core.codec.Encoder; import org.springframework.core.codec.support.ByteBufferDecoder; import org.springframework.core.codec.support.ByteBufferEncoder; -import org.springframework.core.codec.support.JacksonJsonDecoder; -import org.springframework.core.codec.support.JacksonJsonEncoder; -import org.springframework.core.codec.support.Jaxb2Decoder; -import org.springframework.core.codec.support.Jaxb2Encoder; +import org.springframework.http.codec.json.JacksonJsonDecoder; +import org.springframework.http.codec.json.JacksonJsonEncoder; +import org.springframework.http.codec.xml.Jaxb2Decoder; +import org.springframework.http.codec.xml.Jaxb2Encoder; import org.springframework.core.codec.support.StringDecoder; import org.springframework.core.codec.support.StringEncoder; import org.springframework.core.convert.converter.Converter; diff --git a/spring-web-reactive/src/test/java/org/springframework/core/codec/support/StringDecoderTests.java b/spring-web-reactive/src/test/java/org/springframework/core/codec/support/StringDecoderTests.java index f89be25a223..62187a69aa8 100644 --- a/spring-web-reactive/src/test/java/org/springframework/core/codec/support/StringDecoderTests.java +++ b/spring-web-reactive/src/test/java/org/springframework/core/codec/support/StringDecoderTests.java @@ -54,7 +54,7 @@ public class StringDecoderTests extends AbstractDataBufferAllocatingTestCase { MediaType.APPLICATION_JSON)); assertFalse(this.decoder .canDecode(ResolvableType.forClass(Integer.class), MediaType.TEXT_PLAIN)); - assertFalse(this.decoder.canDecode(ResolvableType.forClass(Pojo.class), + assertFalse(this.decoder.canDecode(ResolvableType.forClass(Object.class), MediaType.APPLICATION_JSON)); } diff --git a/spring-web-reactive/src/test/java/org/springframework/core/codec/support/Pojo.java b/spring-web-reactive/src/test/java/org/springframework/http/codec/Pojo.java similarity index 96% rename from spring-web-reactive/src/test/java/org/springframework/core/codec/support/Pojo.java rename to spring-web-reactive/src/test/java/org/springframework/http/codec/Pojo.java index 1b7e7929532..ff4cdc76c4d 100644 --- a/spring-web-reactive/src/test/java/org/springframework/core/codec/support/Pojo.java +++ b/spring-web-reactive/src/test/java/org/springframework/http/codec/Pojo.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.core.codec.support; +package org.springframework.http.codec; import javax.xml.bind.annotation.XmlRootElement; diff --git a/spring-web-reactive/src/test/java/org/springframework/core/codec/support/SseEventEncoderTests.java b/spring-web-reactive/src/test/java/org/springframework/http/codec/SseEventEncoderTests.java similarity index 98% rename from spring-web-reactive/src/test/java/org/springframework/core/codec/support/SseEventEncoderTests.java rename to spring-web-reactive/src/test/java/org/springframework/http/codec/SseEventEncoderTests.java index 6f64ecbbc50..352f8d47993 100644 --- a/spring-web-reactive/src/test/java/org/springframework/core/codec/support/SseEventEncoderTests.java +++ b/spring-web-reactive/src/test/java/org/springframework/http/codec/SseEventEncoderTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.core.codec.support; +package org.springframework.http.codec; import java.util.Arrays; @@ -28,7 +28,7 @@ import org.springframework.core.ResolvableType; import org.springframework.core.io.buffer.AbstractDataBufferAllocatingTestCase; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.FlushingDataBuffer; -import org.springframework.http.codec.SseEventEncoder; +import org.springframework.http.codec.json.JacksonJsonEncoder; import org.springframework.util.MimeType; import org.springframework.web.reactive.sse.SseEvent; diff --git a/spring-web-reactive/src/test/java/org/springframework/core/codec/support/JacksonJsonDecoderTests.java b/spring-web-reactive/src/test/java/org/springframework/http/codec/json/JacksonJsonDecoderTests.java similarity index 95% rename from spring-web-reactive/src/test/java/org/springframework/core/codec/support/JacksonJsonDecoderTests.java rename to spring-web-reactive/src/test/java/org/springframework/http/codec/json/JacksonJsonDecoderTests.java index 6554bc32fcc..54f99e66e7a 100644 --- a/spring-web-reactive/src/test/java/org/springframework/core/codec/support/JacksonJsonDecoderTests.java +++ b/spring-web-reactive/src/test/java/org/springframework/http/codec/json/JacksonJsonDecoderTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.core.codec.support; +package org.springframework.http.codec.json; import java.lang.reflect.Method; import java.util.Arrays; @@ -29,6 +29,8 @@ import org.springframework.core.ResolvableType; import org.springframework.core.io.buffer.AbstractDataBufferAllocatingTestCase; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.http.MediaType; +import org.springframework.http.codec.Pojo; +import org.springframework.http.codec.json.JacksonJsonDecoder; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; diff --git a/spring-web-reactive/src/test/java/org/springframework/core/codec/support/JacksonJsonEncoderTests.java b/spring-web-reactive/src/test/java/org/springframework/http/codec/json/JacksonJsonEncoderTests.java similarity index 95% rename from spring-web-reactive/src/test/java/org/springframework/core/codec/support/JacksonJsonEncoderTests.java rename to spring-web-reactive/src/test/java/org/springframework/http/codec/json/JacksonJsonEncoderTests.java index 95af3fe7e93..cc7bf4d4bd8 100644 --- a/spring-web-reactive/src/test/java/org/springframework/core/codec/support/JacksonJsonEncoderTests.java +++ b/spring-web-reactive/src/test/java/org/springframework/http/codec/json/JacksonJsonEncoderTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.core.codec.support; +package org.springframework.http.codec.json; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -27,6 +27,8 @@ import org.springframework.core.ResolvableType; import org.springframework.core.io.buffer.AbstractDataBufferAllocatingTestCase; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.http.MediaType; +import org.springframework.http.codec.Pojo; +import org.springframework.http.codec.json.JacksonJsonEncoder; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; diff --git a/spring-web-reactive/src/test/java/org/springframework/core/codec/support/JsonObjectDecoderTests.java b/spring-web-reactive/src/test/java/org/springframework/http/codec/json/JsonObjectDecoderTests.java similarity index 98% rename from spring-web-reactive/src/test/java/org/springframework/core/codec/support/JsonObjectDecoderTests.java rename to spring-web-reactive/src/test/java/org/springframework/http/codec/json/JsonObjectDecoderTests.java index 21eddc7afea..6770899ce13 100644 --- a/spring-web-reactive/src/test/java/org/springframework/core/codec/support/JsonObjectDecoderTests.java +++ b/spring-web-reactive/src/test/java/org/springframework/http/codec/json/JsonObjectDecoderTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.core.codec.support; +package org.springframework.http.codec.json; import java.nio.charset.StandardCharsets; diff --git a/spring-web-reactive/src/test/java/org/springframework/core/codec/support/Jaxb2DecoderTests.java b/spring-web-reactive/src/test/java/org/springframework/http/codec/xml/Jaxb2DecoderTests.java similarity index 97% rename from spring-web-reactive/src/test/java/org/springframework/core/codec/support/Jaxb2DecoderTests.java rename to spring-web-reactive/src/test/java/org/springframework/http/codec/xml/Jaxb2DecoderTests.java index afe3194fa95..3b36689720e 100644 --- a/spring-web-reactive/src/test/java/org/springframework/core/codec/support/Jaxb2DecoderTests.java +++ b/spring-web-reactive/src/test/java/org/springframework/http/codec/xml/Jaxb2DecoderTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.core.codec.support; +package org.springframework.http.codec.xml; import java.util.List; import javax.xml.namespace.QName; @@ -34,6 +34,9 @@ import org.springframework.core.codec.support.jaxb.XmlTypeWithNameAndNamespace; import org.springframework.core.io.buffer.AbstractDataBufferAllocatingTestCase; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.http.MediaType; +import org.springframework.http.codec.Pojo; +import org.springframework.http.codec.xml.Jaxb2Decoder; +import org.springframework.http.codec.xml.XmlEventDecoder; import static org.junit.Assert.*; diff --git a/spring-web-reactive/src/test/java/org/springframework/core/codec/support/Jaxb2EncoderTests.java b/spring-web-reactive/src/test/java/org/springframework/http/codec/xml/Jaxb2EncoderTests.java similarity index 97% rename from spring-web-reactive/src/test/java/org/springframework/core/codec/support/Jaxb2EncoderTests.java rename to spring-web-reactive/src/test/java/org/springframework/http/codec/xml/Jaxb2EncoderTests.java index dddeee07590..4476cfcaf73 100644 --- a/spring-web-reactive/src/test/java/org/springframework/core/codec/support/Jaxb2EncoderTests.java +++ b/spring-web-reactive/src/test/java/org/springframework/http/codec/xml/Jaxb2EncoderTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.core.codec.support; +package org.springframework.http.codec.xml; import java.io.IOException; import java.nio.charset.StandardCharsets; @@ -31,6 +31,7 @@ import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.support.DataBufferTestUtils; import org.springframework.core.io.buffer.support.DataBufferUtils; import org.springframework.http.MediaType; +import org.springframework.http.codec.Pojo; import static org.custommonkey.xmlunit.XMLAssert.assertXMLEqual; import static org.custommonkey.xmlunit.XMLAssert.fail; diff --git a/spring-web-reactive/src/test/java/org/springframework/core/codec/support/XmlEventDecoderTests.java b/spring-web-reactive/src/test/java/org/springframework/http/codec/xml/XmlEventDecoderTests.java similarity index 96% rename from spring-web-reactive/src/test/java/org/springframework/core/codec/support/XmlEventDecoderTests.java rename to spring-web-reactive/src/test/java/org/springframework/http/codec/xml/XmlEventDecoderTests.java index 430355d200d..fa942c9b947 100644 --- a/spring-web-reactive/src/test/java/org/springframework/core/codec/support/XmlEventDecoderTests.java +++ b/spring-web-reactive/src/test/java/org/springframework/http/codec/xml/XmlEventDecoderTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.core.codec.support; +package org.springframework.http.codec.xml; import javax.xml.stream.events.XMLEvent; @@ -23,6 +23,7 @@ import reactor.core.publisher.Flux; import reactor.core.test.TestSubscriber; import org.springframework.core.io.buffer.AbstractDataBufferAllocatingTestCase; +import org.springframework.http.codec.xml.XmlEventDecoder; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; diff --git a/spring-web-reactive/src/test/java/org/springframework/web/client/reactive/WebClientIntegrationTests.java b/spring-web-reactive/src/test/java/org/springframework/web/client/reactive/WebClientIntegrationTests.java index 0006c773d2a..f038ab1cb50 100644 --- a/spring-web-reactive/src/test/java/org/springframework/web/client/reactive/WebClientIntegrationTests.java +++ b/spring-web-reactive/src/test/java/org/springframework/web/client/reactive/WebClientIntegrationTests.java @@ -34,7 +34,7 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import reactor.core.test.TestSubscriber; -import org.springframework.core.codec.support.Pojo; +import org.springframework.http.codec.Pojo; import org.springframework.http.HttpHeaders; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; diff --git a/spring-web-reactive/src/test/java/org/springframework/web/reactive/config/ViewResolverRegistryTests.java b/spring-web-reactive/src/test/java/org/springframework/web/reactive/config/ViewResolverRegistryTests.java index 6e46b829b5c..c5035730f8b 100644 --- a/spring-web-reactive/src/test/java/org/springframework/web/reactive/config/ViewResolverRegistryTests.java +++ b/spring-web-reactive/src/test/java/org/springframework/web/reactive/config/ViewResolverRegistryTests.java @@ -19,7 +19,7 @@ import org.junit.Before; import org.junit.Test; import org.springframework.core.Ordered; -import org.springframework.core.codec.support.JacksonJsonEncoder; +import org.springframework.http.codec.json.JacksonJsonEncoder; import org.springframework.web.context.support.StaticWebApplicationContext; import org.springframework.web.reactive.result.view.HttpMessageConverterView; import org.springframework.web.reactive.result.view.UrlBasedViewResolver; diff --git a/spring-web-reactive/src/test/java/org/springframework/web/reactive/config/WebReactiveConfigurationTests.java b/spring-web-reactive/src/test/java/org/springframework/web/reactive/config/WebReactiveConfigurationTests.java index 962bd32c856..0bbeb262c76 100644 --- a/spring-web-reactive/src/test/java/org/springframework/web/reactive/config/WebReactiveConfigurationTests.java +++ b/spring-web-reactive/src/test/java/org/springframework/web/reactive/config/WebReactiveConfigurationTests.java @@ -35,9 +35,9 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.Ordered; import org.springframework.core.ResolvableType; -import org.springframework.core.codec.support.JacksonJsonEncoder; -import org.springframework.core.codec.support.Jaxb2Decoder; -import org.springframework.core.codec.support.Jaxb2Encoder; +import org.springframework.http.codec.json.JacksonJsonEncoder; +import org.springframework.http.codec.xml.Jaxb2Decoder; +import org.springframework.http.codec.xml.Jaxb2Encoder; import org.springframework.core.codec.support.StringDecoder; import org.springframework.core.codec.support.StringEncoder; import org.springframework.core.convert.ConversionService; diff --git a/spring-web-reactive/src/test/java/org/springframework/web/reactive/result/method/annotation/MessageConverterResultHandlerTests.java b/spring-web-reactive/src/test/java/org/springframework/web/reactive/result/method/annotation/MessageConverterResultHandlerTests.java index 295ecc4cf75..2a21fe27fce 100644 --- a/spring-web-reactive/src/test/java/org/springframework/web/reactive/result/method/annotation/MessageConverterResultHandlerTests.java +++ b/spring-web-reactive/src/test/java/org/springframework/web/reactive/result/method/annotation/MessageConverterResultHandlerTests.java @@ -38,8 +38,8 @@ import rx.Observable; import org.springframework.core.ResolvableType; import org.springframework.core.codec.support.ByteBufferEncoder; -import org.springframework.core.codec.support.JacksonJsonEncoder; -import org.springframework.core.codec.support.Jaxb2Encoder; +import org.springframework.http.codec.json.JacksonJsonEncoder; +import org.springframework.http.codec.xml.Jaxb2Encoder; import org.springframework.core.codec.support.StringEncoder; import org.springframework.core.convert.support.GenericConversionService; import org.springframework.core.convert.support.ReactiveStreamsToCompletableFutureConverter; diff --git a/spring-web-reactive/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestBodyArgumentResolverTests.java b/spring-web-reactive/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestBodyArgumentResolverTests.java index 6f46067fabc..142d9ed3dec 100644 --- a/spring-web-reactive/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestBodyArgumentResolverTests.java +++ b/spring-web-reactive/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestBodyArgumentResolverTests.java @@ -43,7 +43,7 @@ import org.springframework.core.MethodParameter; import org.springframework.core.ParameterNameDiscoverer; import org.springframework.core.annotation.SynthesizingMethodParameter; import org.springframework.core.codec.Decoder; -import org.springframework.core.codec.support.JacksonJsonDecoder; +import org.springframework.http.codec.json.JacksonJsonDecoder; import org.springframework.core.codec.support.StringDecoder; import org.springframework.core.convert.support.GenericConversionService; import org.springframework.core.convert.support.ReactiveStreamsToCompletableFutureConverter; diff --git a/spring-web-reactive/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingIntegrationTests.java b/spring-web-reactive/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingIntegrationTests.java index b04b0204ef3..826efa4bbd9 100644 --- a/spring-web-reactive/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingIntegrationTests.java +++ b/spring-web-reactive/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingIntegrationTests.java @@ -39,7 +39,7 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.ParameterizedTypeReference; import org.springframework.core.ResolvableType; -import org.springframework.core.codec.support.JacksonJsonEncoder; +import org.springframework.http.codec.json.JacksonJsonEncoder; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; import org.springframework.core.io.buffer.DataBuffer; diff --git a/spring-web-reactive/src/test/java/org/springframework/web/reactive/result/method/annotation/ResponseBodyResultHandlerTests.java b/spring-web-reactive/src/test/java/org/springframework/web/reactive/result/method/annotation/ResponseBodyResultHandlerTests.java index 64a576c4877..793fc1216f5 100644 --- a/spring-web-reactive/src/test/java/org/springframework/web/reactive/result/method/annotation/ResponseBodyResultHandlerTests.java +++ b/spring-web-reactive/src/test/java/org/springframework/web/reactive/result/method/annotation/ResponseBodyResultHandlerTests.java @@ -27,8 +27,8 @@ import reactor.core.publisher.Mono; import org.springframework.core.ResolvableType; import org.springframework.core.codec.support.ByteBufferEncoder; -import org.springframework.core.codec.support.JacksonJsonEncoder; -import org.springframework.core.codec.support.Jaxb2Encoder; +import org.springframework.http.codec.json.JacksonJsonEncoder; +import org.springframework.http.codec.xml.Jaxb2Encoder; import org.springframework.core.codec.support.StringEncoder; import org.springframework.core.convert.support.DefaultConversionService; import org.springframework.core.convert.support.GenericConversionService; diff --git a/spring-web-reactive/src/test/java/org/springframework/web/reactive/result/method/annotation/ResponseEntityResultHandlerTests.java b/spring-web-reactive/src/test/java/org/springframework/web/reactive/result/method/annotation/ResponseEntityResultHandlerTests.java index 1bebf0fb2d0..edca26d48a4 100644 --- a/spring-web-reactive/src/test/java/org/springframework/web/reactive/result/method/annotation/ResponseEntityResultHandlerTests.java +++ b/spring-web-reactive/src/test/java/org/springframework/web/reactive/result/method/annotation/ResponseEntityResultHandlerTests.java @@ -31,8 +31,8 @@ import rx.Single; import org.springframework.core.ResolvableType; import org.springframework.core.codec.support.ByteBufferEncoder; -import org.springframework.core.codec.support.JacksonJsonEncoder; -import org.springframework.core.codec.support.Jaxb2Encoder; +import org.springframework.http.codec.json.JacksonJsonEncoder; +import org.springframework.http.codec.xml.Jaxb2Encoder; import org.springframework.core.codec.support.StringEncoder; import org.springframework.core.convert.support.GenericConversionService; import org.springframework.core.convert.support.ReactiveStreamsToCompletableFutureConverter; 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 673728f3f76..74bc385ca8a 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 @@ -31,8 +31,8 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.codec.Encoder; import org.springframework.core.codec.support.ByteBufferDecoder; -import org.springframework.core.codec.support.JacksonJsonDecoder; -import org.springframework.core.codec.support.JacksonJsonEncoder; +import org.springframework.http.codec.json.JacksonJsonDecoder; +import org.springframework.http.codec.json.JacksonJsonEncoder; import org.springframework.core.codec.support.StringDecoder; import org.springframework.http.MediaType; import org.springframework.http.client.reactive.ReactorHttpClientRequestFactory; diff --git a/spring-web-reactive/src/test/java/org/springframework/web/reactive/result/view/HttpMessageConverterViewTests.java b/spring-web-reactive/src/test/java/org/springframework/web/reactive/result/view/HttpMessageConverterViewTests.java index 126a7bcdc2f..a6a24ac4f95 100644 --- a/spring-web-reactive/src/test/java/org/springframework/web/reactive/result/view/HttpMessageConverterViewTests.java +++ b/spring-web-reactive/src/test/java/org/springframework/web/reactive/result/view/HttpMessageConverterViewTests.java @@ -32,8 +32,8 @@ import org.junit.Test; import reactor.core.test.TestSubscriber; import org.springframework.core.ResolvableType; -import org.springframework.core.codec.support.JacksonJsonEncoder; -import org.springframework.core.codec.support.Jaxb2Encoder; +import org.springframework.http.codec.json.JacksonJsonEncoder; +import org.springframework.http.codec.xml.Jaxb2Encoder; import org.springframework.core.codec.support.StringEncoder; import org.springframework.core.io.buffer.support.DataBufferTestUtils; import org.springframework.http.HttpMethod;