/** * Invokes {@link #prepareRestTemplate(RestTemplate)}. * * @return RestTemplate with the required Jackson MixIns applied */ public static RestTemplate getDefaultDataflowRestTemplate() { return prepareRestTemplate(null); }
/** * Invokes {@link #prepareRestTemplate(RestTemplate)}. * * @return RestTemplate with the required Jackson MixIns applied */ public static RestTemplate getDefaultDataflowRestTemplate() { return prepareRestTemplate(null); }
@Bean @ConditionalOnMissingBean(DataFlowOperations.class) public DataFlowOperations dataFlowOperations() throws Exception{ RestTemplate template = DataFlowTemplate.prepareRestTemplate(restTemplate); final HttpClientConfigurer httpClientConfigurer = HttpClientConfigurer.create(new URI(properties.getServerUri())) .skipTlsCertificateVerification(properties.isSkipSslValidation()); if(!StringUtils.isEmpty(properties.getAuthentication().getBasic().getUsername()) && !StringUtils.isEmpty(properties.getAuthentication().getBasic().getPassword())){ httpClientConfigurer.basicAuthCredentials(properties.getAuthentication().getBasic().getUsername(), properties.getAuthentication().getBasic().getPassword()); template.setRequestFactory(httpClientConfigurer.buildClientHttpRequestFactory()); } return new DataFlowTemplate(new URI(properties.getServerUri()), template); }
@Bean @ConditionalOnMissingBean(DataFlowOperations.class) public DataFlowOperations dataFlowOperations() throws Exception{ RestTemplate template = DataFlowTemplate.prepareRestTemplate(restTemplate); final HttpClientConfigurer httpClientConfigurer = HttpClientConfigurer.create(new URI(properties.getServerUri())) .skipTlsCertificateVerification(properties.isSkipSslValidation()); if(!StringUtils.isEmpty(properties.getAuthentication().getBasic().getUsername()) && !StringUtils.isEmpty(properties.getAuthentication().getBasic().getPassword())){ httpClientConfigurer.basicAuthCredentials(properties.getAuthentication().getBasic().getUsername(), properties.getAuthentication().getBasic().getPassword()); template.setRequestFactory(httpClientConfigurer.buildClientHttpRequestFactory()); } return new DataFlowTemplate(new URI(properties.getServerUri()), template); }
Assert.notNull(restTemplate, "The provided restTemplate must not be null."); this.restTemplate = prepareRestTemplate(restTemplate);
Assert.notNull(restTemplate, "The provided restTemplate must not be null."); this.restTemplate = prepareRestTemplate(restTemplate);