--------------------------------------------返回JSON数据------------------------------------------------------------------ @Controller public class PersonHandler { @ResponseBody @RequestMapping("/getPerson") public List<Person> getPersons() {
在ssm框架下,MVC向前端返回数据的json工具类代码如下: public class JsonResult<T> { public static final int SUCCESS=0; public static final int ERROR=1; private int state; private T data; private String message; public JsonResult(int state,Throwable e){ this.state=state; t