控制器中代码@RequestMapping(value="/listArea",method=RequestMethod.GET)@ResponseBodyprivateMaplistArea(){MapmodelMap=newHashMap();Listlist=areaService.getAreaList();modelMap.put("rows",list);modelMap.put("total",list.size());returnmodelMap;}xml中的使用了这个pom.xml引入下列依赖com.fasterxml.jackson.corejackson-core2.9.8com.fasterxml.jackson.corejackson-annotations2.9.0javax.servletjavax.servlet-api3.1.0访问接口时报错WARNorg.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver-Resolved[org.springframework.http.converter.HttpMessageNotWritableException:Noconverterfoundforreturnvalueoftype:classjava.util.HashMap]DEBUGorg.springframework.web.servlet.DispatcherServlet-Completed500INTERNAL_SERVER_ERROR
添加回答
举报
0/150
提交
取消