@Controller public class TestController { @RequestMapping("/getData") @ResponseBody public Pager getPersons(){ Pager result = new Pager(); List num = new ArrayList(); Person person ; for(int i=0;i<10;i++){ person = new Person(); person.setAge("1"+i); person.setName("骚一"+i+"号"); person.setSex("male"+i); num.add(person); } result.setRows(num); return result; }
@RequestMapping("/testList") public ModelAndView toList(){ return new ModelAndView("testDatagrid"); } }
其中用到的实体类:
package test.datagrid.entity;
public class Person { private String name; private String sex; private String age; public String getName() { return name; } public void setName(String name) { this.name = name; } public String getSex() { return sex; } public void setSex(String sex) { this.sex = sex; } public String getAge() { return age; } public void setAge(String age) { this.age = age; } }
什么是Thrift
The Apache Thrift software framework, for scalable cross-language services development, combines a software stack with a code generation engine to build services that work efficiently and s
org.json.JSONException: No value for items
在JSON解析中会遇到一种错误,很常见的错误
06-21 12:19:08.714 2098-2127/com.jikexueyuan.secret I/System.out﹕ Result:{"status":1,"page":1,&