ApiExtController { @RequestMapping(value = "/check") public ServiceResult check(@RequestParam("appid") String appid) { try { if (null != appid) { Project project = projectDao.getProjectByAppId(appid); CheckIDsView checkIDsView = new CheckIDsView(project.getId(), project.getDal_group_id()); return ServiceResult.success(checkIDsView); } else { return ServiceResult.fail("ApiExtController.data appid 为空"); } } catch (Exception e) { return ServiceResult.fail("ApiExtController.data appid : " + appid + " " + StringUtil.getMessage(e)); } }  @RequestMapping(value = "/check") ServiceResult check(@RequestParam("appid") String appid); @RequestMapping(value = "/checkDblist") ServiceResult checkDblist(@RequestParam("appid") String appid, @CurrentUser LoginUser user); @RequestMapping(value = "/checkAll") ServiceResult<String> checkAll(@RequestParam("appid") String appid, @CurrentUser LoginUser user, HttpServletRequest request); @RequestMapping(value = "/appidExist") ServiceResult appidExist(@RequestParam(value = "appid", defaultValue = "0") String appid);  }
@Test public void check() throws Exception { mvc.perform(MockMvcRequestBuilders.get("/apiext/data?appid=1001") .contentType(MediaType.APPLICATION_JSON_UTF8) .accept(MediaType.APPLICATION_JSON_UTF8)) .andExpect(MockMvcResultMatchers.status().isOk()) .andDo(MockMvcResultHandlers.print()); }