`

struts2 与extjs开发中json 出现异常原因分析

阅读更多
http://lianj-lee.iteye.com/blog/435383


出现这个问题是某属性通过串行化json数据异常。可能你不懂了,意思是这样的,struts2的action里面的数据转换成json数据时是将提供了 getter的属性都统统串行化输出JSON到客户端。有的时候,很多属性并不一定要串行化成json数据。比如:使用的spring注入属性 recordService,也就是提供了getter和setter!

所以解决这个异常方法就是在不需要串行化的属性的getter前加上annotation,
就是@JSON(serialize=false)
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics