Http://www.blogjava.net/iamlibo/archive/2013/11/21/406646.html
————————————————————————————————————————————————————————————————————
The JSON returned by the spring MVC @ResponseBody received in the low version of IE prompts for the download to be saved. There's no problem with chrome.
The solution is:
<mvc:annotation-driven ignoredefaultmodelonredirect= "true" validator= "validator" > <mvc: Message-converters register-defaults= "false" > <bean Span style= "color: #0000ff;" >class = "Org.springframework.http.converter.ByteArrayHttpMessageConverter"/> <bean class = "Org.springframework.http.converter.StringHttpMessageConverter" > <property name= "suppor Tedmediatypes "value=" Text/plain;charset=utf-8 "/> </bean> <bean class =" Org.springframework.http.converter.json.MappingJa Cksonhttpmessageconverter "> <property name=" supportedmediatypes "value=" Text/plain;charset=utf-8 "/&G T </bean> </mvc:message-converters> </mvc:annotation-driven>
If you are prompted with an HTTP 406 error, change the value of produces in the method comment to application/json;charset=utf-8
or remove it to normal access.
Spring MVC returns JSON prompts for download solution under IE