Spring集成Jackson之XML配置
以下为在Spring中集成Jackson输出Json数据功能,在输出数据中不包含Null数据;具体输出数据内容信息控制详见:org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
下面直接贴实现代码:
1、servlet-context.xml配置信息:
<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context" xmlns:mvc="http://www.springframework.org/schema/mv