티스토리 뷰

아직 삽질 중...



http://ismydream.tistory.com/140



MessageConverter 의 종류

- StringHttpMessageConverter

- FormHttpMessageConverter

- ByteArrayMessageConverter

- MarshallingHttpMessageConverter

- MappingJacksonHttpMessageConverter

- SourceHttpMessageConverter

- BufferedImagedHttpMessageConverter




- MessageConverter(bean)를 사용하는 경우..


<bean id="jsonHttpMessageConverter" class="org.springframework.http.converter.json.MappingJacksonHttpMessageConverter" />

<bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter">

<property name="messageConverters">

  <list>

<ref bean="jsonHttpMessageConverter"/>

  </list>

</property>

</bean>


or

<mvc:annotation-driven>
<mvc:message-converters>
<bean class="org.springframework.http.converter.StringHttpMessageConverter">
<property name="supportedMediaTypes">
<list>
<value>text/html;charset=utf-8</value>
</list>
</property>
</bean>
</mvc:message-converters>
</mvc:annotation-driven>


'공부 > Spring :: Web Framework' 카테고리의 다른 글

[@ResponseBody] MessageConverter 관련  (0) 2015.08.20
사용자 입력 데이터 validation  (0) 2015.07.27
js study 2  (0) 2015.06.17
Thymeleaf :: Spring beans  (0) 2015.05.31
use maven properties in web.xml  (0) 2015.05.24
댓글
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/11   »
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
글 보관함