API Gateway service의 Eureka 등록으로 인한 Routing 설정 변경
choi-ys opened this issue · 0 comments
choi-ys commented
- AS-IS
spring:
cloud:
gateway:
routes:
- id: user-service
uri: http://localhost:9001/
predicates:
- Path=/user/**
실제 서버의 연결정보(ip, hostname, port)를 기반으로 forwarding 대상 micro-service routing 정보 설정
- TO-BE
spring:
cloud:
gateway:
routes:
- id: user-service
uri: lb://USER-SERVICE
predicates:
- Path=/user-service/**
Eureka Server에 등록된 Instance의 spring.application.name 정보를 기반으로 forwarding 대상 micro-service routing 정보 설정