Java 类org.springframework.boot.devtools.autoconfigure.RemoteDevToolsProperties 实例源码

项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:RemoteClientConfiguration.java   
private ClientHttpRequestInterceptor getSecurityInterceptor() {
    RemoteDevToolsProperties remoteProperties = this.properties.getRemote();
    String secretHeaderName = remoteProperties.getSecretHeaderName();
    String secret = remoteProperties.getSecret();
    Assert.state(secret != null,
            "The environment value 'spring.devtools.remote.secret' "
                    + "is required to secure your connection.");
    return new HttpHeaderInterceptor(secretHeaderName, secret);
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:RemoteClientConfiguration.java   
@PostConstruct
private void logWarnings() {
    RemoteDevToolsProperties remoteProperties = this.properties.getRemote();
    if (!remoteProperties.getDebug().isEnabled()
            && !remoteProperties.getRestart().isEnabled()) {
        logger.warn("Remote restart and debug are both disabled.");
    }
    if (!this.remoteUrl.startsWith("https://")) {
        logger.warn("The connection to " + this.remoteUrl
                + " is insecure. You should use a URL starting with 'https://'.");
    }
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:RemoteClientConfiguration.java   
@Bean
public TunnelClient remoteDebugTunnelClient(
        ClientHttpRequestFactory requestFactory) {
    RemoteDevToolsProperties remoteProperties = this.properties.getRemote();
    String url = this.remoteUrl + remoteProperties.getContextPath() + "/debug";
    TunnelConnection connection = new HttpTunnelConnection(url, requestFactory);
    int localPort = remoteProperties.getDebug().getLocalPort();
    TunnelClient client = new TunnelClient(localPort, connection);
    client.addListener(new LoggingTunnelClientListener());
    return client;
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:LocalDebugPortAvailableCondition.java   
@Override
public ConditionOutcome getMatchOutcome(ConditionContext context,
        AnnotatedTypeMetadata metadata) {
    RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
            context.getEnvironment(), "spring.devtools.remote.debug.");
    Integer port = resolver.getProperty("local-port", Integer.class);
    if (port == null) {
        port = RemoteDevToolsProperties.Debug.DEFAULT_LOCAL_PORT;
    }
    if (isPortAvailable(port)) {
        return ConditionOutcome.match("Local debug port available");
    }
    return ConditionOutcome.noMatch("Local debug port unavailable");
}
项目:spring-boot-concourse    文件:RemoteClientConfiguration.java   
private ClientHttpRequestInterceptor getSecurityInterceptor() {
    RemoteDevToolsProperties remoteProperties = this.properties.getRemote();
    String secretHeaderName = remoteProperties.getSecretHeaderName();
    String secret = remoteProperties.getSecret();
    Assert.state(secret != null,
            "The environment value 'spring.devtools.remote.secret' "
                    + "is required to secure your connection.");
    return new HttpHeaderInterceptor(secretHeaderName, secret);
}
项目:spring-boot-concourse    文件:RemoteClientConfiguration.java   
@PostConstruct
private void logWarnings() {
    RemoteDevToolsProperties remoteProperties = this.properties.getRemote();
    if (!remoteProperties.getDebug().isEnabled()
            && !remoteProperties.getRestart().isEnabled()) {
        logger.warn("Remote restart and debug are both disabled.");
    }
    if (!this.remoteUrl.startsWith("https://")) {
        logger.warn("The connection to " + this.remoteUrl
                + " is insecure. You should use a URL starting with 'https://'.");
    }
}
项目:spring-boot-concourse    文件:RemoteClientConfiguration.java   
@Bean
public TunnelClient remoteDebugTunnelClient(
        ClientHttpRequestFactory requestFactory) {
    RemoteDevToolsProperties remoteProperties = this.properties.getRemote();
    String url = this.remoteUrl + remoteProperties.getContextPath() + "/debug";
    TunnelConnection connection = new HttpTunnelConnection(url, requestFactory);
    int localPort = remoteProperties.getDebug().getLocalPort();
    TunnelClient client = new TunnelClient(localPort, connection);
    client.addListener(new LoggingTunnelClientListener());
    return client;
}
项目:spring-boot-concourse    文件:LocalDebugPortAvailableCondition.java   
@Override
public ConditionOutcome getMatchOutcome(ConditionContext context,
        AnnotatedTypeMetadata metadata) {
    RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
            context.getEnvironment(), "spring.devtools.remote.debug.");
    Integer port = resolver.getProperty("local-port", Integer.class);
    if (port == null) {
        port = RemoteDevToolsProperties.Debug.DEFAULT_LOCAL_PORT;
    }
    if (isPortAvailable(port)) {
        return ConditionOutcome.match("Local debug port available");
    }
    return ConditionOutcome.noMatch("Local debug port unavailable");
}
项目:contestparser    文件:RemoteClientConfiguration.java   
private ClientHttpRequestInterceptor getSecurityInterceptor() {
    RemoteDevToolsProperties remoteProperties = this.properties.getRemote();
    String secretHeaderName = remoteProperties.getSecretHeaderName();
    String secret = remoteProperties.getSecret();
    Assert.state(secret != null,
            "The environment value 'spring.devtools.remote.secret' "
                    + "is required to secure your connection.");
    return new HttpHeaderInterceptor(secretHeaderName, secret);
}
项目:contestparser    文件:RemoteClientConfiguration.java   
@PostConstruct
private void logWarnings() {
    RemoteDevToolsProperties remoteProperties = this.properties.getRemote();
    if (!remoteProperties.getDebug().isEnabled()
            && !remoteProperties.getRestart().isEnabled()) {
        logger.warn("Remote restart and debug are both disabled.");
    }
    if (!this.remoteUrl.startsWith("https://")) {
        logger.warn("The connection to " + this.remoteUrl
                + " is insecure. You should use a URL starting with 'https://'.");
    }
}
项目:contestparser    文件:RemoteClientConfiguration.java   
@Bean
public TunnelClient remoteDebugTunnelClient(
        ClientHttpRequestFactory requestFactory) {
    RemoteDevToolsProperties remoteProperties = this.properties.getRemote();
    String url = this.remoteUrl + remoteProperties.getContextPath() + "/debug";
    TunnelConnection connection = new HttpTunnelConnection(url, requestFactory);
    int localPort = remoteProperties.getDebug().getLocalPort();
    TunnelClient client = new TunnelClient(localPort, connection);
    client.addListener(new LoggingTunnelClientListener());
    return client;
}
项目:contestparser    文件:LocalDebugPortAvailableCondition.java   
@Override
public ConditionOutcome getMatchOutcome(ConditionContext context,
        AnnotatedTypeMetadata metadata) {
    RelaxedPropertyResolver resolver = new RelaxedPropertyResolver(
            context.getEnvironment(), "spring.devtools.remote.debug.");
    Integer port = resolver.getProperty("local-port", Integer.class);
    if (port == null) {
        port = RemoteDevToolsProperties.Debug.DEFAULT_LOCAL_PORT;
    }
    if (isPortAvailable(port)) {
        return ConditionOutcome.match("Local debug port available");
    }
    return ConditionOutcome.noMatch("Local debug port unavailable");
}