摘要: https://github.com/mooosu/spring-mvc-mybatis-sample http://edwin.baculsoft.com/2015/01/a-simple-spring-4-and-mybatis-transaction-example/ http://wiki. 阅读全文
posted @ 2016-03-21 22:08 chuiyuan 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 步骤: 阅读全文
posted @ 2016-03-21 11:40 chuiyuan 阅读(1245) 评论(0) 推荐(0) 编辑
摘要: 方法一 使用jackson-databind直接返回对象。 方法二 使用Gson将对象转换成String再返回,要设置contentType为application/json。 方法三 将对象转换成json,然后直接写入到HttpServletResponse中。 例子如下 JsonUtil如下 阅读全文
posted @ 2016-03-21 11:03 chuiyuan 阅读(416) 评论(0) 推荐(0) 编辑