Browse Source

Document default charset in Jackson message converters Javadoc

Issue: SPR-13600
pull/892/merge
Sebastien Deleuze 9 years ago
parent
commit
994a11da3e
  1. 2
      spring-messaging/src/main/java/org/springframework/messaging/converter/MappingJackson2MessageConverter.java
  2. 3
      spring-web/src/main/java/org/springframework/http/converter/json/MappingJackson2HttpMessageConverter.java
  3. 3
      spring-web/src/main/java/org/springframework/http/converter/xml/MappingJackson2XmlHttpMessageConverter.java

2
spring-messaging/src/main/java/org/springframework/messaging/converter/MappingJackson2MessageConverter.java

@ -71,7 +71,7 @@ public class MappingJackson2MessageConverter extends AbstractMessageConverter { @@ -71,7 +71,7 @@ public class MappingJackson2MessageConverter extends AbstractMessageConverter {
/**
* Construct a {@code MappingJackson2MessageConverter} supporting
* the {@code application/json} MIME type.
* the {@code application/json} MIME type with {@code UTF-8} character set.
*/
public MappingJackson2MessageConverter() {
super(new MimeType("application", "json", Charset.forName("UTF-8")));

3
spring-web/src/main/java/org/springframework/http/converter/json/MappingJackson2HttpMessageConverter.java

@ -29,7 +29,8 @@ import org.springframework.http.MediaType; @@ -29,7 +29,8 @@ import org.springframework.http.MediaType;
*
* <p>This converter can be used to bind to typed beans, or untyped {@link java.util.HashMap HashMap} instances.
*
* <p>By default, this converter supports {@code application/json} and {@code application/*+json}.
* <p>By default, this converter supports {@code application/json} and {@code application/*+json}
* with {@code UTF-8} character set.
* This can be overridden by setting the {@link #setSupportedMediaTypes supportedMediaTypes} property.
*
* <p>The default constructor uses the default configuration provided by {@link Jackson2ObjectMapperBuilder}.

3
spring-web/src/main/java/org/springframework/http/converter/xml/MappingJackson2XmlHttpMessageConverter.java

@ -29,7 +29,8 @@ import org.springframework.util.Assert; @@ -29,7 +29,8 @@ import org.springframework.util.Assert;
* that can read and write XML using <a href="https://github.com/FasterXML/jackson-dataformat-xml">
* Jackson 2.x extension component for reading and writing XML encoded data</a>.
*
* <p>By default, this converter supports {@code application/xml}, {@code text/xml}, and {@code application/*+xml}.
* <p>By default, this converter supports {@code application/xml}, {@code text/xml}, and
* {@code application/*+xml} with {@code UTF-8} character set.
* This can be overridden by setting the {@link #setSupportedMediaTypes(java.util.List) supportedMediaTypes} property.
*
* <p>The default constructor uses the default configuration provided by {@link Jackson2ObjectMapperBuilder}.

Loading…
Cancel
Save