2012-02-15 82 views

回答

0
@RequestMapping(value="/list", method=RequestMethod.GET)//, headers=ACCEPT_JSON) 
@ResponseBody 
public List<User> userList() { 
    LOG.info("get list of Users"); 

    List<User> users = new ArrayList<User>(); 
    users.add(new User("user1", "pass1", "name1", Boolean.TRUE)); 
    users.add(new User("user2", "pass2", "name2", Boolean.TRUE)); 
    users.add(new User("user3", "pass3", "name3", Boolean.TRUE)); 

    return users; 
}