默认起用的MVC注解功能
<bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter">
StringHttpMessageConverter: that can read and write Strings from the HTTP request and response.
FormHttpMessageConverter:that can read and write form data from the HTTP request and response.
ByteArrayMessageConverter:that can read and write byte arrays from the HTTP request and response.
MarshallingHttpMessageConverter:XML的转换需要使用Spring的 Marshaller
和 Unmarshaller.
MappingJacksonHttpMessageConverter:JSON的转换.
SourceHttpMessageConverter:能够读/写来自HTTP的请求与响应的javax.xml.transform.Source ,支持
DOMSource
, SAXSource
, 和 StreamSource
的XML格式
BufferedImageHttpMessageConverter:that can read and write java.awt.image.BufferedImage
from the HTTP request and response
起用JSON转换功能
MappingJacksonHttpMessageConverter能够将POJO对象自动转换为JSON对象
posted on 2010-09-30 11:56
岁月神偷 阅读(18802)
评论(0) 编辑 收藏 所属分类:
Spring