diff --git a/spring-cloud-config-client/src/test/java/org/springframework/cloud/context/scope/refresh/RefreshScopeConfigurationTests.java b/spring-cloud-config-client/src/test/java/org/springframework/cloud/context/scope/refresh/RefreshScopeConfigurationTests.java index c8cf80f9..51303e5f 100644 --- a/spring-cloud-config-client/src/test/java/org/springframework/cloud/context/scope/refresh/RefreshScopeConfigurationTests.java +++ b/spring-cloud-config-client/src/test/java/org/springframework/cloud/context/scope/refresh/RefreshScopeConfigurationTests.java @@ -54,6 +54,13 @@ public class RefreshScopeConfigurationTests { } } + private void refresh() { + EnvironmentManager environmentManager = context.getBean(EnvironmentManager.class); + environmentManager.setProperty("message", "Hello Dave!"); + org.springframework.cloud.context.scope.refresh.RefreshScope scope = context.getBean(org.springframework.cloud.context.scope.refresh.RefreshScope.class); + scope.refreshAll(); + } + /** * See gh-43 */ @@ -87,11 +94,28 @@ public class RefreshScopeConfigurationTests { assertEquals("Hello Dave!", message); } - private void refresh() { - EnvironmentManager environmentManager = context.getBean(EnvironmentManager.class); - environmentManager.setProperty("message", "Hello Dave!"); - org.springframework.cloud.context.scope.refresh.RefreshScope scope = context.getBean(org.springframework.cloud.context.scope.refresh.RefreshScope.class); - scope .refreshAll(); + // WTF? Maven can't compile without the FQN on this one (not the others). + @org.springframework.context.annotation.Configuration + protected static class NestedApp { + + @RestController + @RefreshScope + protected static class NestedController { + + @Value("${message:Hello World!}") + String message; + + @RequestMapping("/") + public String hello() { + return message; + } + + } + + public static void main(String[] args) { + SpringApplication.run(ClientApp.class, args); + } + } @Configuration @@ -139,27 +163,4 @@ public class RefreshScopeConfigurationTests { } - @Configuration - protected static class NestedApp { - - @RestController - @RefreshScope - protected static class NestedController { - - @Value("${message:Hello World!}") - String message; - - @RequestMapping("/") - public String hello() { - return message; - } - - } - - public static void main(String[] args) { - SpringApplication.run(ClientApp.class, args); - } - - } - }