Browse Source

SPR-5782 - BufferedImageHttpMessageConverter

conversation
Arjen Poutsma 16 years ago
parent
commit
3a1c88f059
  1. 4
      org.springframework.web.servlet/src/main/java/org/springframework/web/servlet/mvc/annotation/AnnotationMethodHandlerAdapter.java
  2. 4
      org.springframework.web/src/main/java/org/springframework/web/client/RestTemplate.java

4
org.springframework.web.servlet/src/main/java/org/springframework/web/servlet/mvc/annotation/AnnotationMethodHandlerAdapter.java

@ -51,6 +51,7 @@ import org.springframework.core.ParameterNameDiscoverer; @@ -51,6 +51,7 @@ import org.springframework.core.ParameterNameDiscoverer;
import org.springframework.core.annotation.AnnotationUtils;
import org.springframework.http.HttpInputMessage;
import org.springframework.http.HttpOutputMessage;
import org.springframework.http.converter.BufferedImageHttpMessageConverter;
import org.springframework.http.converter.ByteArrayHttpMessageConverter;
import org.springframework.http.converter.FormHttpMessageConverter;
import org.springframework.http.converter.HttpMessageConverter;
@ -161,7 +162,8 @@ public class AnnotationMethodHandlerAdapter extends WebContentGenerator implemen @@ -161,7 +162,8 @@ public class AnnotationMethodHandlerAdapter extends WebContentGenerator implemen
private HttpMessageConverter<?>[] messageConverters =
new HttpMessageConverter[]{new ByteArrayHttpMessageConverter(), new StringHttpMessageConverter(),
new FormHttpMessageConverter(), new SourceHttpMessageConverter()};
new FormHttpMessageConverter(), new SourceHttpMessageConverter(),
new BufferedImageHttpMessageConverter()};
public AnnotationMethodHandlerAdapter() {
// no restriction of HTTP methods by default

4
org.springframework.web/src/main/java/org/springframework/web/client/RestTemplate.java

@ -31,6 +31,7 @@ import org.springframework.http.client.ClientHttpRequest; @@ -31,6 +31,7 @@ import org.springframework.http.client.ClientHttpRequest;
import org.springframework.http.client.ClientHttpRequestFactory;
import org.springframework.http.client.ClientHttpResponse;
import org.springframework.http.client.support.HttpAccessor;
import org.springframework.http.converter.BufferedImageHttpMessageConverter;
import org.springframework.http.converter.ByteArrayHttpMessageConverter;
import org.springframework.http.converter.FormHttpMessageConverter;
import org.springframework.http.converter.HttpMessageConverter;
@ -94,7 +95,8 @@ public class RestTemplate extends HttpAccessor implements RestOperations { @@ -94,7 +95,8 @@ public class RestTemplate extends HttpAccessor implements RestOperations {
private HttpMessageConverter<?>[] messageConverters =
new HttpMessageConverter[]{new ByteArrayHttpMessageConverter(), new StringHttpMessageConverter(),
new FormHttpMessageConverter(), new SourceHttpMessageConverter()};
new FormHttpMessageConverter(), new SourceHttpMessageConverter(),
new BufferedImageHttpMessageConverter()};
private ResponseErrorHandler errorHandler = new DefaultResponseErrorHandler();

Loading…
Cancel
Save