Uploaded image for project: 'Apache ServiceComb'
  1. Apache ServiceComb
  2. SCB-1122

Specify the name of RestTemplate in the configuration

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • pack-0.4.0
    • Saga
    • 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;
      }
      

      Attachments

        Activity

          People

            zhanglei Lei Zhang
            njiang Willem Jiang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 0.5h
                0.5h