pom.xml
<!-- json jar包 -->
<dependency>
<groupId>net.sf.json-lib</groupId>
<artifactId>json-lib</artifactId>
<version>2.4</version>
<classifier>jdk15</classifier>
</dependency>
<dependency>
<groupId>net.sf.ezmorph</groupId>
<artifactId>ezmorph</artifactId>
<version>1.0.6</version>
</dependency>
java
@ResponseBody
@RequestMapping(value="/vueCart")
public String vueCart(@RequestParam Map<String, Object> paramMap){
ResultEntity<Gifts> resultEntity = new ResultEntity<Gifts>();
resultEntity.setMessage("success");
resultEntity.setStatus("200");
//return "vue/vue_cart";
resultEntity.setResult(userService1.selectAllGifts(paramMap));
return JSONArray.fromObject(resultEntity).toString();
}