Example usage for org.springframework.ide.eclipse.boot.dash.cloudfoundry CloudFoundryTargetProperties skipSslValidation

List of usage examples for org.springframework.ide.eclipse.boot.dash.cloudfoundry CloudFoundryTargetProperties skipSslValidation

Introduction

In this page you can find the example usage for org.springframework.ide.eclipse.boot.dash.cloudfoundry CloudFoundryTargetProperties skipSslValidation.

Prototype

public boolean skipSslValidation() 

Source Link

Usage

From source file:org.springframework.ide.eclipse.boot.dash.cloudfoundry.CloudAppDashElement.java

@Override
protected RestTemplate getRestTemplate() {
    CloudFoundryTargetProperties props = getTarget().getTargetProperties();
    boolean skipSsl = props.isSelfsigned() || props.skipSslValidation();
    if (skipSsl) {
        HttpClient httpClient = HttpClients.custom().setHostnameVerifier(new AllowAllHostnameVerifier())
                .setSslcontext(buildSslContext()).build();
        ClientHttpRequestFactory requestFactory = new HttpComponentsClientHttpRequestFactory(httpClient);
        return new RestTemplate(requestFactory);
    } else {//from   w ww . j a v  a  2s .  c om
        //This worked before so lets not try to fix that case.
        return super.getRestTemplate();
    }
}