修改<mvc:annotation-driven>
在<mvc:message-converters>节点的配置文件中加上下面一段话
1
2
3
4
5
6
7
8
9
|
<!-- 避免IE执行AJAX时,返回JSON出现下载文件 -->
<
bean
id
=
"mappingJacksonHttpMessageConverter"
class
=
"org.springframework.http.converter.json.MappingJacksonHttpMessageConverter"
>
<
property
name
=
"supportedMediaTypes"
>
<
list
>
<
value
>text/html;charset=UTF-8</
value
>
</
list
>
</
property
>
</
bean
>
|