title: Spring cloud multiple RestTemplate
body: <p>I am using spring cloud: Spring Boot Application with Eureka + Ribbon default configuration.</p>
  
  <p>I am using 2 <code>RestTemplate</code> configurations, both are <code>@LoadBalanced</code> currently and both of them have the same <code>UriTemplateHandler</code>.</p>
  
  <p>I declared both the <code>@SpringBootApplication</code> and also the <code>@RibbonClient(name="${service.name}")</code> annotations.</p>
  
  <p>My problem is:</p>
  
  <p>When I am trying to access the first configured <code>RestTemplate</code>, the <code>RestTemplate</code> resolvs (by eureka and load balancing by ribbon) to a server , not as I requested as configured in the <code>UriTemplateHandler</code>. </p>
  
  <p>For example: in the <code>UriTemplateHandler</code> I configured "A-Service" and in real time the <code>restTemplate</code> sends the <code>httpRequest</code> to "B-Service"
  This behavior happens often, not just for a specific request, but it looks like it only happens when I'm accessing the first configured <code>RestTemplate</code>.</p>
  
  <p>Is it a problem to use 2 RestTemplate with the same uri?</p>
  
  <p>I have no idea why it happens, please advise.</p>