@Test public void check() throws Exception { mockMvc.perform(MockMvcRequestBuilders.post("/server/data") .contentType(MediaType.APPLICATION_JSON_UTF8) .param("id", "1") .accept(MediaType.APPLICATION_JSON_UTF8)) .andExpect(MockMvcResultMatchers.status().isOk()) .andDo(MockMvcResultHandlers.print()); }
@RequestMapping(value = "/check") public ConfigCkeckResult<ConfigCheckItem> check(@CurrentUser LoginUser user, @RequestParam("id") Long id) throws Exception { Server server = serverDao.getServerById(id); List<ConfigDataResponse> list = serverService.getCheckData(user, server); return ConfigCheckBase.checkData(list); }
ServerController { @RequestMapping(value = "/check") public ConfigCkeckResult<ConfigCheckItem> check(@CurrentUser LoginUser user, @RequestParam("id") Long id) throws Exception { Server server = serverDao.getServerById(id); List<ConfigDataResponse> list = serverService.getCheckData(user, server); return ConfigCheckBase.checkData(list); } }
ServerController { @RequestMapping(value = "/check") public ConfigCkeckResult<ConfigCheckItem> check(@CurrentUser LoginUser user, @RequestParam("id") Long id) throws Exception { Server server = serverDao.getServerById(id); List<ConfigDataResponse> list = serverService.getCheckData(user, server); return ConfigCheckBase.checkData(list); }  }
ServerController { @RequestMapping(value = "/check") public ConfigCkeckResult<ConfigCheckItem> check(@CurrentUser LoginUser user, @RequestParam("id") Long id) throws Exception { Server server = serverDao.getServerById(id); List<ConfigDataResponse> list = serverService.getCheckData(user, server); return ConfigCheckBase.checkData(list); }  @RequestMapping(value = "/list", method = RequestMethod.POST) ServiceResult<ListResult<ServerView>> loadPageList(@RequestBody Paging<Server> paging); @RequestMapping(value = "/add", method = RequestMethod.POST) ServiceResult<String> add(@Validated(AddServer.class) @RequestBody Server server, @CurrentUser LoginUser user, Errors errors); @RequestMapping(value = "/update", method = RequestMethod.PUT) ServiceResult<String> update(@Validated(UpdateServer.class) @RequestBody Server server, @CurrentUser LoginUser user, Errors errors); @RequestMapping(value = "/delete", method = RequestMethod.DELETE) ServiceResult<String> delete(@Validated(DeleteServer.class) @RequestBody Server server, @CurrentUser LoginUser user, Errors errors); @RequestMapping(value = "/sync") ServiceResult<String> sync(@RequestParam("id") Long id, @CurrentUser LoginUser user); @RequestMapping(value = "/check") ConfigCkeckResult<ConfigCheckItem> check(@CurrentUser LoginUser user, @RequestParam("id") Long id); }
ServerController { @RequestMapping(value = "/check") public ConfigCkeckResult<ConfigCheckItem> check(@CurrentUser LoginUser user, @RequestParam("id") Long id) throws Exception { Server server = serverDao.getServerById(id); List<ConfigDataResponse> list = serverService.getCheckData(user, server); return ConfigCheckBase.checkData(list); }  @RequestMapping(value = "/list", method = RequestMethod.POST) ServiceResult<ListResult<ServerView>> loadPageList(@RequestBody Paging<Server> paging); @RequestMapping(value = "/add", method = RequestMethod.POST) ServiceResult<String> add(@Validated(AddServer.class) @RequestBody Server server, @CurrentUser LoginUser user, Errors errors); @RequestMapping(value = "/update", method = RequestMethod.PUT) ServiceResult<String> update(@Validated(UpdateServer.class) @RequestBody Server server, @CurrentUser LoginUser user, Errors errors); @RequestMapping(value = "/delete", method = RequestMethod.DELETE) ServiceResult<String> delete(@Validated(DeleteServer.class) @RequestBody Server server, @CurrentUser LoginUser user, Errors errors); @RequestMapping(value = "/sync") ServiceResult<String> sync(@RequestParam("id") Long id, @CurrentUser LoginUser user); @RequestMapping(value = "/check") ConfigCkeckResult<ConfigCheckItem> check(@CurrentUser LoginUser user, @RequestParam("id") Long id);  }