@Test public void findAll() throws Exception { mockMvc.perform(get("/webUpdate")).andDo(result -> { JSONObject object = JSONObject.fromObject(result.getResponse().getContentAsString()); assertEquals(SUCCESS.getCode(), object.getInt(Code)); JSONArray jsonArray = object.getJSONArray(Result); jsonArray.forEach(o -> { WebUpdateModel webUpdate = (WebUpdateModel) JSONObject.toBean(JSONObject.fromObject(o), WebUpdateModel.class); assertNotEquals(0, webUpdate.getId()); assertNotNull(webUpdate.getTime()); assertNotNull(webUpdate.getInfo()); }); }); }
@GetMapping("/webUpdate") public Response findAll() { return ResponseUtil.success(webUpdateInfoService.findAll()); }
WebUpdateInfoController { @GetMapping("/webUpdate") public Response findAll() { return ResponseUtil.success(webUpdateInfoService.findAll()); } }
WebUpdateInfoController { @GetMapping("/webUpdate") public Response findAll() { return ResponseUtil.success(webUpdateInfoService.findAll()); }  }
WebUpdateInfoController { @GetMapping("/webUpdate") public Response findAll() { return ResponseUtil.success(webUpdateInfoService.findAll()); }  @PostMapping("/admin/webUpdate/create") Response create(@RequestParam("info") String info); @DeleteMapping("/admin/webUpdate/del/{id}") Response del(@PathVariable("id") long id); @PutMapping("/admin/webUpdate/update") Response update(@RequestParam("id") long id, @RequestParam("info") String info); @GetMapping("/webUpdate") Response findAll(); @GetMapping("/webUpdate/pages") Response page(@RequestParam("page") int page, @RequestParam("count") int count); @GetMapping("/lastestUpdateTime") Response lastestUpdateTime(); }
WebUpdateInfoController { @GetMapping("/webUpdate") public Response findAll() { return ResponseUtil.success(webUpdateInfoService.findAll()); }  @PostMapping("/admin/webUpdate/create") Response create(@RequestParam("info") String info); @DeleteMapping("/admin/webUpdate/del/{id}") Response del(@PathVariable("id") long id); @PutMapping("/admin/webUpdate/update") Response update(@RequestParam("id") long id, @RequestParam("info") String info); @GetMapping("/webUpdate") Response findAll(); @GetMapping("/webUpdate/pages") Response page(@RequestParam("page") int page, @RequestParam("count") int count); @GetMapping("/lastestUpdateTime") Response lastestUpdateTime();  }