@Test public void getDBCatalogs() throws Exception { mockMvc.perform(MockMvcRequestBuilders.get("/db/catalogs") .contentType(MediaType.APPLICATION_JSON_UTF8) .accept(MediaType.APPLICATION_JSON_UTF8)) .andExpect(MockMvcResultMatchers.status().isOk()) .andDo(MockMvcResultHandlers.print()); }
@RequestMapping(value = "/catalogs") public ServiceResult<List<String>> getDBCatalogs(@RequestParam("dbset_id") Long dbsetId) throws Exception { return databaseService.getDBCatalogs(dbsetId); }
DatabaseController { @RequestMapping(value = "/catalogs") public ServiceResult<List<String>> getDBCatalogs(@RequestParam("dbset_id") Long dbsetId) throws Exception { return databaseService.getDBCatalogs(dbsetId); } }
DatabaseController { @RequestMapping(value = "/catalogs") public ServiceResult<List<String>> getDBCatalogs(@RequestParam("dbset_id") Long dbsetId) throws Exception { return databaseService.getDBCatalogs(dbsetId); }  }
DatabaseController { @RequestMapping(value = "/catalogs") public ServiceResult<List<String>> getDBCatalogs(@RequestParam("dbset_id") Long dbsetId) throws Exception { return databaseService.getDBCatalogs(dbsetId); }  @RequestMapping(value = "/list", method = RequestMethod.POST) ServiceResult<ListResult<DataBaseView>> list(@RequestBody Paging<DataBaseInfo> paging, @CurrentUser LoginUser loginUser); @RequestMapping(value = "/page/list", method = RequestMethod.POST) ServiceResult<ListResult<DataBaseView>> getDBListByGroupId(@RequestBody Paging<DataBaseInfo> paging, @CurrentUser LoginUser loginUser); @RequestMapping(value = "/connectionTest", method = RequestMethod.POST) ServiceResult connectionTest(@RequestBody ConnectionRequest connectionRequest); @RequestMapping(value = "/getTableAttributes") ServiceResult getTableAttributes(@RequestParam(value = "id", defaultValue = "0") Long id, @RequestParam(value = "name", defaultValue = "") String name); @RequestMapping(value = "/isExist", method = RequestMethod.POST) ServiceResult isExist(@RequestBody List<String> db_names); @RequestMapping(value = "/dbs") ServiceResult<List<DataBaseInfo>> getUsers(@RequestParam(value = "name", defaultValue = "") String name, @RequestParam(value = "groupId", defaultValue = "") Long groupId); @RequestMapping(value = "/add", method = RequestMethod.POST) ServiceResult<String> add(@RequestBody DataBaseInfo dataBaseInfo, @CurrentUser LoginUser user, Errors errors); @RequestMapping(value = "/addDbs", method = RequestMethod.POST) ServiceResult<String> addDbs(@RequestBody List<DataBaseInfo> list, @CurrentUser LoginUser user, Errors errors); @RequestMapping(value = "/update", method = RequestMethod.PUT) ServiceResult<String> update(@Validated(UpdateDataBase.class) @RequestBody DataBaseInfo dataBaseInfo, @CurrentUser LoginUser user, Errors errors); @RequestMapping(value = "/delete", method = RequestMethod.DELETE) ServiceResult<String> delete(@Validated(DeleteDataBase.class) @RequestBody DataBaseInfo dataBaseInfo, @CurrentUser LoginUser user, Errors errors); @RequestMapping(value = "/catalogs") ServiceResult<List<String>> getDBCatalogs(@RequestParam("dbset_id") Long dbsetId); @RequestMapping(value = "/catalogsByDbId") ServiceResult<List<String>> getDBCatalogsByDbId(@RequestParam("dbId") Long dbId); @RequestMapping(value = "/sqlValidate", method = RequestMethod.POST) ServiceResult validateSQL(@RequestBody SqlValidateRequest sqlValidateRequest); @RequestMapping(value = "/sync") ServiceResult<String> sync(@RequestParam("id") Long id, @CurrentUser LoginUser user); @RequestMapping(value = "/getdbnames") ServiceResult<String> getdbnames(@RequestParam("appid") String appid); @RequestMapping(value = "/check") ConfigCkeckResult check(@RequestParam("id") Long id, @CurrentUser LoginUser user); @RequestMapping(value = "/syncdb") ServiceResult<String> syncdb(@Validated(AddDataBase.class) @RequestBody DataBaseInfo dataBaseInfo, @CurrentUser LoginUser user, Errors errors); @RequestMapping("/buttons") ServiceResult getDataBaseButton(@CurrentUser LoginUser user); }
DatabaseController { @RequestMapping(value = "/catalogs") public ServiceResult<List<String>> getDBCatalogs(@RequestParam("dbset_id") Long dbsetId) throws Exception { return databaseService.getDBCatalogs(dbsetId); }  @RequestMapping(value = "/list", method = RequestMethod.POST) ServiceResult<ListResult<DataBaseView>> list(@RequestBody Paging<DataBaseInfo> paging, @CurrentUser LoginUser loginUser); @RequestMapping(value = "/page/list", method = RequestMethod.POST) ServiceResult<ListResult<DataBaseView>> getDBListByGroupId(@RequestBody Paging<DataBaseInfo> paging, @CurrentUser LoginUser loginUser); @RequestMapping(value = "/connectionTest", method = RequestMethod.POST) ServiceResult connectionTest(@RequestBody ConnectionRequest connectionRequest); @RequestMapping(value = "/getTableAttributes") ServiceResult getTableAttributes(@RequestParam(value = "id", defaultValue = "0") Long id, @RequestParam(value = "name", defaultValue = "") String name); @RequestMapping(value = "/isExist", method = RequestMethod.POST) ServiceResult isExist(@RequestBody List<String> db_names); @RequestMapping(value = "/dbs") ServiceResult<List<DataBaseInfo>> getUsers(@RequestParam(value = "name", defaultValue = "") String name, @RequestParam(value = "groupId", defaultValue = "") Long groupId); @RequestMapping(value = "/add", method = RequestMethod.POST) ServiceResult<String> add(@RequestBody DataBaseInfo dataBaseInfo, @CurrentUser LoginUser user, Errors errors); @RequestMapping(value = "/addDbs", method = RequestMethod.POST) ServiceResult<String> addDbs(@RequestBody List<DataBaseInfo> list, @CurrentUser LoginUser user, Errors errors); @RequestMapping(value = "/update", method = RequestMethod.PUT) ServiceResult<String> update(@Validated(UpdateDataBase.class) @RequestBody DataBaseInfo dataBaseInfo, @CurrentUser LoginUser user, Errors errors); @RequestMapping(value = "/delete", method = RequestMethod.DELETE) ServiceResult<String> delete(@Validated(DeleteDataBase.class) @RequestBody DataBaseInfo dataBaseInfo, @CurrentUser LoginUser user, Errors errors); @RequestMapping(value = "/catalogs") ServiceResult<List<String>> getDBCatalogs(@RequestParam("dbset_id") Long dbsetId); @RequestMapping(value = "/catalogsByDbId") ServiceResult<List<String>> getDBCatalogsByDbId(@RequestParam("dbId") Long dbId); @RequestMapping(value = "/sqlValidate", method = RequestMethod.POST) ServiceResult validateSQL(@RequestBody SqlValidateRequest sqlValidateRequest); @RequestMapping(value = "/sync") ServiceResult<String> sync(@RequestParam("id") Long id, @CurrentUser LoginUser user); @RequestMapping(value = "/getdbnames") ServiceResult<String> getdbnames(@RequestParam("appid") String appid); @RequestMapping(value = "/check") ConfigCkeckResult check(@RequestParam("id") Long id, @CurrentUser LoginUser user); @RequestMapping(value = "/syncdb") ServiceResult<String> syncdb(@Validated(AddDataBase.class) @RequestBody DataBaseInfo dataBaseInfo, @CurrentUser LoginUser user, Errors errors); @RequestMapping("/buttons") ServiceResult getDataBaseButton(@CurrentUser LoginUser user);  }