title: Register with a single Eureka server
body: <p>I have an application that needs to communicate with 2 independent Eureka servers to fetch the service urls by service name. And it needs to register itself with one of the Eureka servers, not both. Different services will be running on each of the Eureka servers and the service registry shouldn't be shared by the Eureka servers. Is there a way in spring boot to achieve this behavior? This is my application.yml and I have provided 2 eureka servers as a list. The service is getting registered with both the servers. </p>
  
  <p><strong>Application:</strong></p>
  
  <pre><code>@SpringBootApplication
  @EnableDiscoveryClient
  public class SampleApplication {
      public static void main(String[] args) {
          SpringApplication.run(SampleApplication.class, args);
      }
  }
  </code></pre>
  
  <p><strong>pom.xml</strong></p>
  
  <pre><code>&lt;dependency&gt;
     &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
     &lt;artifactId&gt;spring-cloud-starter-netflix-eureka-client&lt;/artifactId&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p><strong>application.yml :</strong></p>
  
  <pre><code>spring:
     application.name: mock
  eureka:
     client:
     serviceUrl.defaultZone: url1, url2
  </code></pre>