默認起用的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的轉(zhuǎn)換需要使用Spring的 Marshaller 和 Unmarshaller.
MappingJacksonHttpMessageConverter:JSON的轉(zhuǎn)換.
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轉(zhuǎn)換功能
MappingJacksonHttpMessageConverter能夠?qū)OJO對象自動轉(zhuǎn)換為JSON對象
需要依賴JSON對象的處理JAR包
jackson-core-lgpl.jar
jackson-mapper-lgpl.jar
下載地址:
http://jackson./
|