@Test public void getUsers() throws Exception { mockMvc.perform(MockMvcRequestBuilders.post("/getUsers") .accept(MediaType.APPLICATION_JSON_UTF8)).andDo(print()); }
@RequestMapping("/getUsers") public List<User> getUsers() { List<User> users=userMapper.getAll(); return users; }
UserController { @RequestMapping("/getUsers") public List<User> getUsers() { List<User> users=userMapper.getAll(); return users; } }
UserController { @RequestMapping("/getUsers") public List<User> getUsers() { List<User> users=userMapper.getAll(); return users; }  }
UserController { @RequestMapping("/getUsers") public List<User> getUsers() { List<User> users=userMapper.getAll(); return users; }  @RequestMapping("/getUsers") List<User> getUsers(); @RequestMapping("/getUser") User getUser(Long id); @RequestMapping("/add") void save(User user); @RequestMapping(value="update") void update(User user); @RequestMapping(value="/delete/{id}") void delete(@PathVariable("id") Long id); }
UserController { @RequestMapping("/getUsers") public List<User> getUsers() { List<User> users=userMapper.getAll(); return users; }  @RequestMapping("/getUsers") List<User> getUsers(); @RequestMapping("/getUser") User getUser(Long id); @RequestMapping("/add") void save(User user); @RequestMapping(value="update") void update(User user); @RequestMapping(value="/delete/{id}") void delete(@PathVariable("id") Long id);  }