Java 类org.springframework.boot.devtools.restart.RestartScopeInitializer 实例源码

项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:RemoteClientConfigurationTests.java   
private void configure(String remoteUrl, boolean setSecret, String... pairs) {
    this.context = new AnnotationConfigEmbeddedWebApplicationContext();
    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();
}
项目:spring-boot-concourse    文件:RemoteClientConfigurationTests.java   
private void configure(String remoteUrl, boolean setSecret, String... pairs) {
    this.context = new AnnotationConfigEmbeddedWebApplicationContext();
    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();
}
项目:contestparser    文件:RemoteClientConfigurationTests.java   
private void configure(String remoteUrl, boolean setSecret, String... pairs) {
    this.context = new AnnotationConfigEmbeddedWebApplicationContext();
    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();
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:RemoteSpringApplication.java   
private Collection<ApplicationContextInitializer<?>> getInitializers() {
    List<ApplicationContextInitializer<?>> initializers = new ArrayList<ApplicationContextInitializer<?>>();
    initializers.add(new RestartScopeInitializer());
    return initializers;
}
项目:spring-boot-concourse    文件:RemoteSpringApplication.java   
private Collection<ApplicationContextInitializer<?>> getInitializers() {
    List<ApplicationContextInitializer<?>> initializers = new ArrayList<ApplicationContextInitializer<?>>();
    initializers.add(new RestartScopeInitializer());
    return initializers;
}
项目:contestparser    文件:RemoteSpringApplication.java   
private Collection<ApplicationContextInitializer<?>> getInitializers() {
    List<ApplicationContextInitializer<?>> initializers = new ArrayList<ApplicationContextInitializer<?>>();
    initializers.add(new RestartScopeInitializer());
    return initializers;
}