Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Code Block
languagegroovy
titlebuild.gradle
linenumberstrue
dependencies {
    compile('org.springframework.cloud:spring-cloud-starter-netflix-eureka-client') // 3. To use Eureka client
}
Code Block
languagejava
titleEurekaServiceApplication
linenumberstrue
@EnableEurekaClient 
@SpringBootApplication 
public class EurekaServiceApplication { 
 public static void main(String[] args) { 
 SpringApplication.run(EurekaServiceApplication.class); 
 } 
}
Code Block
languageyml
titleapplication.yml
application.yml 
eurekaspring: 
 clientcloud: 
 serviceUrlservice-registry: 
 defaultZone: http://localhost:8761/eureka/ auto-registration: 
   enabled: false #현재 인스턴스를 Reigstry 에 등록하지 않고 싶을 때 false
  • 특별한 시나리오 없이 DiscoveryClient 직접 호출 필요 없음
  • (Ribbon 이 DiscoveryClient 를 이용해서 서버 목록을 가져옴)