@Test public void getActiveProfilesTest() throws Exception { MvcResult res = mock.perform(get("/api/profile-info") .accept(MediaType.APPLICATION_JSON)) .andExpect(status().isOk()) .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8)) .andReturn(); assertTrue(res.getResponse().getContentAsString().contains("\"activeProfiles\":[\""+profiles[0]+"\"]")); }
@GetMapping("/profile-info") public ProfileInfoVM getActiveProfiles() { String[] activeProfiles = DefaultProfileUtil.getActiveProfiles(env); return new ProfileInfoVM(activeProfiles, getRibbonEnv(activeProfiles), nativeSearchLocation, gitUri, gitSearchLocation); }
ProfileInfoResource { @GetMapping("/profile-info") public ProfileInfoVM getActiveProfiles() { String[] activeProfiles = DefaultProfileUtil.getActiveProfiles(env); return new ProfileInfoVM(activeProfiles, getRibbonEnv(activeProfiles), nativeSearchLocation, gitUri, gitSearchLocation); } }
ProfileInfoResource { @GetMapping("/profile-info") public ProfileInfoVM getActiveProfiles() { String[] activeProfiles = DefaultProfileUtil.getActiveProfiles(env); return new ProfileInfoVM(activeProfiles, getRibbonEnv(activeProfiles), nativeSearchLocation, gitUri, gitSearchLocation); } ProfileInfoResource(Environment env, JHipsterProperties jHipsterProperties); }
ProfileInfoResource { @GetMapping("/profile-info") public ProfileInfoVM getActiveProfiles() { String[] activeProfiles = DefaultProfileUtil.getActiveProfiles(env); return new ProfileInfoVM(activeProfiles, getRibbonEnv(activeProfiles), nativeSearchLocation, gitUri, gitSearchLocation); } ProfileInfoResource(Environment env, JHipsterProperties jHipsterProperties); @GetMapping("/profile-info") ProfileInfoVM getActiveProfiles(); }
ProfileInfoResource { @GetMapping("/profile-info") public ProfileInfoVM getActiveProfiles() { String[] activeProfiles = DefaultProfileUtil.getActiveProfiles(env); return new ProfileInfoVM(activeProfiles, getRibbonEnv(activeProfiles), nativeSearchLocation, gitUri, gitSearchLocation); } ProfileInfoResource(Environment env, JHipsterProperties jHipsterProperties); @GetMapping("/profile-info") ProfileInfoVM getActiveProfiles();  }