0
<bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter">
  <property name="messageConverters">
    <util:list>
      <bean id="byteArrayMessageConverter"   class="org.springframework.http.converter.ByteArrayHttpMessageConverter"/>
    </util:list>
  </property>
</bean> 

I'm new to the Spring java configuration to create a bean. Can some one help me with the java configuration for the above xml configuration. I have an requirement to send image to client through my rest spring controller.

  • possible duplicate of [How do i upload/stream large images using Spring 3.2 spring-mvc in a restful way](http://stackoverflow.com/questions/14615692/how-do-i-upload-stream-large-images-using-spring-3-2-spring-mvc-in-a-restful-way) – Innovation Jan 02 '15 at 09:38
  • No In that question they have not written about the configuration required. The above xml congiguration i have posted need's to be converted to java configuration using @Bean annotation. Pls help if you know the conversion – soujanya sharma Jan 02 '15 at 09:43
  • the question that you have asked have a very broad level and there is no one who want to answer such a question.Try to learn spring basic configuration from this website http://www.mkyong.com/tutorials/spring-tutorials/ – Innovation Jan 02 '15 at 09:45
  • Please read question before making duplicate. :( – soujanya sharma Jan 02 '15 at 10:12
  • Which spring versions as generally you shouldn't be using the `AnnotationMethodHandlerAdapter` anymore and the `ByteArrayMessageConverter` is already registered by default... – M. Deinum Jan 02 '15 at 12:09

0 Answers0