@Test public void testConfigureRestTemplates() { vgsProxyConfiguration.configureRestTemplates(); verify(restTemplate).setRequestFactory(any()); }
@PostConstruct public void configureRestTemplates() { if (restTemplates != null) { final ClientHttpRequestFactory requestFactory = createRequestFactory(); for (RestTemplate restTemplate : restTemplates) { restTemplate.setRequestFactory(requestFactory); } } }
VgsProxyConfiguration { @PostConstruct public void configureRestTemplates() { if (restTemplates != null) { final ClientHttpRequestFactory requestFactory = createRequestFactory(); for (RestTemplate restTemplate : restTemplates) { restTemplate.setRequestFactory(requestFactory); } } } }
VgsProxyConfiguration { @PostConstruct public void configureRestTemplates() { if (restTemplates != null) { final ClientHttpRequestFactory requestFactory = createRequestFactory(); for (RestTemplate restTemplate : restTemplates) { restTemplate.setRequestFactory(requestFactory); } } } @Autowired  VgsProxyConfiguration(@Value("${vgs.proxy.url}") String forwardProxyUrl); }
VgsProxyConfiguration { @PostConstruct public void configureRestTemplates() { if (restTemplates != null) { final ClientHttpRequestFactory requestFactory = createRequestFactory(); for (RestTemplate restTemplate : restTemplates) { restTemplate.setRequestFactory(requestFactory); } } } @Autowired  VgsProxyConfiguration(@Value("${vgs.proxy.url}") String forwardProxyUrl); @Autowired(required = false) void setRestTemplates(@VgsProxied List<RestTemplate> restTemplates); @PostConstruct void configureRestTemplates(); ClientHttpRequestFactory createRequestFactory(); }
VgsProxyConfiguration { @PostConstruct public void configureRestTemplates() { if (restTemplates != null) { final ClientHttpRequestFactory requestFactory = createRequestFactory(); for (RestTemplate restTemplate : restTemplates) { restTemplate.setRequestFactory(requestFactory); } } } @Autowired  VgsProxyConfiguration(@Value("${vgs.proxy.url}") String forwardProxyUrl); @Autowired(required = false) void setRestTemplates(@VgsProxied List<RestTemplate> restTemplates); @PostConstruct void configureRestTemplates(); ClientHttpRequestFactory createRequestFactory();  }