use of org.springframework.boot.devtools.restart.RestartScopeInitializer in project spring-boot by spring-projects.
the class RemoteClientConfigurationTests method configure.
private void configure(String remoteUrl, boolean setSecret, String... pairs) {
this.context = new AnnotationConfigServletWebServerApplicationContext();
new RestartScopeInitializer().initialize(this.context);
this.context.register(Config.class, RemoteClientConfiguration.class);
String remoteUrlProperty = "remoteUrl:" + remoteUrl + ":" + RemoteClientConfigurationTests.remotePort;
EnvironmentTestUtils.addEnvironment(this.context, remoteUrlProperty);
EnvironmentTestUtils.addEnvironment(this.context, pairs);
if (setSecret) {
EnvironmentTestUtils.addEnvironment(this.context, "spring.devtools.remote.secret:secret");
}
this.context.refresh();
}
use of org.springframework.boot.devtools.restart.RestartScopeInitializer in project spring-boot by spring-projects.
the class RemoteSpringApplication method getInitializers.
private Collection<ApplicationContextInitializer<?>> getInitializers() {
List<ApplicationContextInitializer<?>> initializers = new ArrayList<>();
initializers.add(new RestartScopeInitializer());
return initializers;
}
Aggregations