List of usage examples for org.springframework.boot.web.client RestTemplateBuilder requestFactory
Supplier requestFactory
To view the source code for org.springframework.boot.web.client RestTemplateBuilder requestFactory.
Click Source Link
From source file:software.coolstuff.springframework.owncloud.service.impl.rest.OwncloudRestResourceServiceImpl.java
public OwncloudRestResourceServiceImpl(final RestTemplateBuilder builder, final OwncloudRestProperties properties, final SardineCacheLoader sardineCacheLoader, final OwncloudRestUserServiceExtension userService) throws MalformedURLException { this.properties = properties; this.sardineCacheLoader = sardineCacheLoader; this.userService = userService; URL locationURL = OwncloudRestUtils.checkAndConvertLocation(properties.getLocation()); this.rootUri = appendOptionalSuffix(locationURL, URI_SUFFIX); log.debug("Build the RestTemplate based on Root URI {}", rootUri); restTemplate = builder.requestFactory(HttpComponentsClientHttpRequestFactory.class) .messageConverters(new ByteArrayHttpMessageConverter()).rootUri(rootUri).build(); }