@Test public void initializeDb() throws Exception { requestJson = JSONObject.toJSONString(InitDbUserRequset.builder().adminName("name").build()); mockMvc.perform(MockMvcRequestBuilders.post("/setupDb/initializeDb") .contentType(MediaType.APPLICATION_JSON_UTF8) .content(requestJson) .accept(MediaType.APPLICATION_JSON_UTF8)) .andExpect(MockMvcResultMatchers.status().isOk()) .andDo(MockMvcResultHandlers.print()); }
@RequestMapping(value = "initializeDb", method = RequestMethod.POST) public ServiceResult initializeDb(@RequestBody InitDbUserRequset initDbUserRequset) { try { return ServiceResult.success(); } catch (Exception e) { log.error("SetupDBController.initializeDb : {}", StringUtil.getMessage(e)); return ServiceResult.fail(StringUtil.getMessage(e)); } }
SetupDataBaseController { @RequestMapping(value = "initializeDb", method = RequestMethod.POST) public ServiceResult initializeDb(@RequestBody InitDbUserRequset initDbUserRequset) { try { return ServiceResult.success(); } catch (Exception e) { log.error("SetupDBController.initializeDb : {}", StringUtil.getMessage(e)); return ServiceResult.fail(StringUtil.getMessage(e)); } } }
SetupDataBaseController { @RequestMapping(value = "initializeDb", method = RequestMethod.POST) public ServiceResult initializeDb(@RequestBody InitDbUserRequset initDbUserRequset) { try { return ServiceResult.success(); } catch (Exception e) { log.error("SetupDBController.initializeDb : {}", StringUtil.getMessage(e)); return ServiceResult.fail(StringUtil.getMessage(e)); } }  }
SetupDataBaseController { @RequestMapping(value = "initializeDb", method = RequestMethod.POST) public ServiceResult initializeDb(@RequestBody InitDbUserRequset initDbUserRequset) { try { return ServiceResult.success(); } catch (Exception e) { log.error("SetupDBController.initializeDb : {}", StringUtil.getMessage(e)); return ServiceResult.fail(StringUtil.getMessage(e)); } }  @RequestMapping(value = "/setupDbCheck") ServiceResult setupDbCheck(); @RequestMapping(value = "/connectionTest", method = RequestMethod.POST) ServiceResult connectionTest(@RequestBody ConnectionRequest connectionRequest); @RequestMapping(value = "tableConsistentCheck", method = RequestMethod.POST) ServiceResult tableConsistentCheck(@RequestBody ConnectionRequest connectionRequest); @RequestMapping(value = "initializeDb", method = RequestMethod.POST) ServiceResult initializeDb(@RequestBody InitDbUserRequset initDbUserRequset); }
SetupDataBaseController { @RequestMapping(value = "initializeDb", method = RequestMethod.POST) public ServiceResult initializeDb(@RequestBody InitDbUserRequset initDbUserRequset) { try { return ServiceResult.success(); } catch (Exception e) { log.error("SetupDBController.initializeDb : {}", StringUtil.getMessage(e)); return ServiceResult.fail(StringUtil.getMessage(e)); } }  @RequestMapping(value = "/setupDbCheck") ServiceResult setupDbCheck(); @RequestMapping(value = "/connectionTest", method = RequestMethod.POST) ServiceResult connectionTest(@RequestBody ConnectionRequest connectionRequest); @RequestMapping(value = "tableConsistentCheck", method = RequestMethod.POST) ServiceResult tableConsistentCheck(@RequestBody ConnectionRequest connectionRequest); @RequestMapping(value = "initializeDb", method = RequestMethod.POST) ServiceResult initializeDb(@RequestBody InitDbUserRequset initDbUserRequset);  }