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

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

Introduction

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

Prototype

public boolean isSelfsigned() 

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 {//  ww w.jav a2 s . c o  m
        //This worked before so lets not try to fix that case.
        return super.getRestTemplate();
    }
}