[ 
https://issues.apache.org/jira/browse/SCB-1122?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Willem Jiang reassigned SCB-1122:
---------------------------------

    Assignee: Lei Zhang

> Specify the name of RestTemplate in the configuration
> -----------------------------------------------------
>
>                 Key: SCB-1122
>                 URL: https://issues.apache.org/jira/browse/SCB-1122
>             Project: Apache ServiceComb
>          Issue Type: Improvement
>          Components: Saga
>            Reporter: Willem Jiang
>            Assignee: Lei Zhang
>            Priority: Major
>             Fix For: pack-0.4.0
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> It's could help us resolve the restemplate conflict issue by specify the name 
> of rest template.
> {code}
> @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;
> }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to