티스토리 뷰
아직 삽질 중...
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 |
댓글