<?xml version="1.0" encoding="UTF-8"?>
<!-- SpringMVC配置文件 -->
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.2.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd"> <!-- 组件扫描 -->
<context:component-scan base-package="com.rbac"/> <!-- 视图解析器 -->
<bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver" p:prefix="/WEB-INF/jsp/" p:suffix=".jsp"></bean> <!-- 避免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> <!-- 启动Spring MVC的注解功能 -->
<bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter">
<property name="messageConverters">
<list>
<ref bean="mappingJacksonHttpMessageConverter" /> <!-- json转换器 -->
</list>
</property>
</bean> </beans>

SpringMVC 避免IE执行AJAX时,返回JSON出现下载文件的更多相关文章

  1. spring mvc 避免IE执行AJAX时,返回JSON出现下载文件

    <!-- 避免IE执行AJAX时,返回JSON出现下载文件 --> <bean id="mappingJacksonHttpMessageConverter" c ...

  2. SpringMVC避免IE执行AJAX,返回JSON出现下载文件

  3. 避免IE执行AJAX时,返回JSON出现下载文件

    <bean id="mappingJacksonHttpMessageConverter" class="org.springframework.http.conv ...

  4. [转]SpringMVC使用@ResponseBody时返回json的日期格式、@DatetimeFormat使用注意

    一.SpringMVC使用@ResponseBody时返回json的日期格式 前提了解: @ResponseBody 返回json字符串的核心类是org.springframework.http.co ...

  5. SpringMVC使用@ResponseBody时返回json的日期格式、@DatetimeFormat使用注意

    一.SpringMVC使用@ResponseBody时返回json的日期格式 前提了解: @ResponseBody 返回json字符串的核心类是org.springframework.http.co ...

  6. Ajax调用返回json,xml数据类型(0517--pm)

    一.返回Json型数据: 1.主页面 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " ...

  7. dbda封装类(包括:返回二维数组、Ajax调用返回字符串、Ajax调用返回JSON)

    <?php class DBDA { public $host = "localhost"; public $uid = "root"; public $ ...

  8. Ajax--json(Ajax调用返回json封装代码、格式及注意事项)

    Ajax调用json封装代码<dbda.php>: //Ajax调用返回JSON public function JsonQuery($sql,$type=1,$db="mydb ...

  9. jquery ajax调用返回json格式数据处理

    Ajax请求默认的都是异步的 如果想同步 async设置为false就可以(默认是true) var html = $.ajax({ url: "some.php", async: ...

随机推荐

  1. 02-语言入门-02-ASCII码排序

    题目地址: http://acm.nyist.net/JudgeOnline/problem.php?pid=4    描述 输入三个字符(可以重复)后,按各字符的ASCII码从小到大的顺序输出这三个 ...

  2. spring+hibernate+Struts2 整合(全注解及注意事项)

    最近帮同学做毕设,一个物流管理系统,一个点餐系统,用注解开发起来还是很快的,就是刚开始搭环境费了点事,今天把物流管理系统的一部分跟环境都贴出来,有什么不足的,请大神不吝赐教. 1.结构如下 2.jar ...

  3. java.lang.NoClassDefFoundError: javax/wsdl/OperationType

    You should find the javax.wsdl package inside wsdl4j.jar Check for the line starting with 'Found IBM ...

  4. 函数 page_dir_get_n_heap

    查看某page中含有的记录个数 #define PAGE_N_HEAP 4 /* number of records in the heap, bit =flag: new-style compact ...

  5. 用Rational Rose来建立数据库表

    这里以MS SQL Server2000中已有的一个Northwind库为例,我们命名新的数据库名为NorthwindRose:我们只挑其中的两个表Customers和Employees做示例,另外我 ...

  6. 【转】 IOS中定时器NSTimer的开启与关闭

    原文网址:http://blog.csdn.net/enuola/article/details/8099461 调用一次计时器方法: myTimer = [NSTimer scheduledTime ...

  7. MVC中前台所得

    前台页面时间格式修改: @item.CreateTime.ToString("yyyy-MM-dd hh:mm:ss") 前台方法调用传参数: <a href="# ...

  8. ms_sql:drop and create a job

    /****** Object: Job [syncData_23_00] Script Date: 09/30/2013 16:48:32 ******/ ) IF EXISTS (SELECT jo ...

  9. Top Android App使用的组件 2

    微信_355 SQLCipher:info.guardianproject.database:Android数据库加密 微博_650 点信传媒:cn.dx:广告平台 Apache HttpClient ...

  10. jQuery 遍历 - parent() 方法

    ylbtech-jQuery-sizzle:jQuery 遍历 - parent() 方法  parent() 获得当前匹配元素集合中每个元素的父元素,使用选择器进行筛选是可选的. 1.A,jQuer ...