Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
Description
It's could help us resolve the restemplate conflict issue by specify the name of rest template.
@Configuration public class RestTemplateConfig { @Autowired(required = false) OmegaContext context; @Bean(name = "omegaRestTemplate") public RestTemplate omegaRestTemplate() { RestTemplate template = new RestTemplate(); List<ClientHttpRequestInterceptor> interceptors = template.getInterceptors(); interceptors.add(new TransactionClientHttpRequestInterceptor(context)); template.setInterceptors(interceptors); return template; }