Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info
iconfalse

Table of Contents

사전조건

Info
iconfalse

Eureka Server (Registry) 만들기

Code Block
git checkout tags/step-4-eureka-completed -b step-4-eureka-completed

Eureka Client 적용하기 - Product 서버

...

Code Block
languageyml
titleapplication.yml
linenumberstrue
server:
  port: 8081

spring:
  application:
    name: display

hystrix:
  command:
    productInfo:    # command key. use 'default' for global setting.
      execution:
        isolation:
          thread:
            timeoutInMilliseconds: 3000
      circuitBreaker:
        requestVolumeThreshold: 1   # Minimum number of request to calculate circuit breaker's health. default 20
        errorThresholdPercentage: 50 # Error percentage to open circuit. default 50

product:
  ribbon:
    # listOfServers: localhost:8082,localhost:7777  #서버 주소는 Eureka Server에서 가져와라!
    MaxAutoRetries: 0
    MaxAutoRetriesNextServer: 1

eureka:
  instance:
    prefer-ip-address: true
  client:
    service-url:
      defaultZone: http://127.0.0.1:8761/eureka  # default address

...

실행결과

Info
iconfalse

Image Added

Image Added

Image Added