Struts2 json插件返回json数据配置
来源:互联网 发布:用java写自我介绍 编辑:程序博客网 时间:2024/06/06 16:34
<package name="json" namespace="/" extends="json-default">
<!--获取所有部门,返回inputStream 返回json数据 -->
<action name="getAllDeptToJson" class="deptAction" method="getAllDeptToJson">
<result name="success" type="stream">
<param name="contentType">application/json</param>
<param name="inputName">inputStream</param>
<param name="contentDisposition">inline;filename="depts.json"</param>
</result>
</action>
<!--获取所有部门,使用struts-json-plugin.jar返回json数据 -->
<action name="getAllDeptToJson2" class="deptAction" method="getAllDeptToJson2">
<result name="success" type="json">
<!--JSON序列化第1种方式 -->
<param name="root">depts</param>
<param name="excludeProperties">\ [\ d+\ ].emps,\ [\ d+\ ].loc</param>
<!--JSON序列化第2种方式 -->
<!-- <param name="includeProperties">depts.*</param>
<param name="excludeProperties">depts\ [\ d+\ ].emps,depts\ [\ d+\ ].loc</param> -->
</result>
</action>
</package>
<!--获取所有部门,返回inputStream 返回json数据 -->
<action name="getAllDeptToJson" class="deptAction" method="getAllDeptToJson">
<result name="success" type="stream">
<param name="contentType">application/json</param>
<param name="inputName">inputStream</param>
<param name="contentDisposition">inline;filename="depts.json"</param>
</result>
</action>
<!--获取所有部门,使用struts-json-plugin.jar返回json数据 -->
<action name="getAllDeptToJson2" class="deptAction" method="getAllDeptToJson2">
<result name="success" type="json">
<!--JSON序列化第1种方式 -->
<param name="root">depts</param>
<param name="excludeProperties">\ [\ d+\ ].emps,\ [\ d+\ ].loc</param>
<!--JSON序列化第2种方式 -->
<!-- <param name="includeProperties">depts.*</param>
<param name="excludeProperties">depts\ [\ d+\ ].emps,depts\ [\ d+\ ].loc</param> -->
</result>
</action>
</package>
阅读全文
0 0
- Struts2 json插件返回json数据配置
- struts2返回json数据配置
- Struts2不用插件返回json格式数据
- struts2返回json数据 ——不使用json插件
- Struts2返回json数据 intellij环境配置
- struts2 返回json数据
- Struts2返回JSON数据
- Struts2返回JSON数据
- struts2返回json数据
- struts2返回json数据
- Struts2返回JSON数据
- struts2 返回json数据
- struts2 返回json数据
- struts2 返回json数据
- Struts2返回JSON数据
- struts2 返回json数据
- Struts2返回JSON数据
- Struts2配置返回json
- 根据byte计算文件大小
- hdu 2066 迪杰斯特拉算法入门
- XenServer命令行方式自动化安装VM
- 集成环信导入.jar和so文件的坑
- andriod——二级列表完美实现购物车
- Struts2 json插件返回json数据配置
- Elasticsearch(七)elasticsearch集群内原理
- esp和ebp详解
- 移动架构35_数据库架构:数据库升级及分库实现多用户登陆
- android 改变输入法enter键文字 为搜索 下一个 以及前往
- 求解最大公约数的两种算法
- linux日常
- 通过Dockerfile创建nginx服务的Centos镜像
- java虚拟机(四)--垃圾回收算法与垃圾收集器