spring-cloud-gateway

gradle 의존성 추가
// https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-starter-netflix-eureka-client
implementation("org.springframework.cloud:spring-cloud-starter-netflix-eureka-client:3.1.0")
// https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-starter-gateway
implementation("org.springframework.cloud:spring-cloud-starter-gateway:3.1.0")
yml
server:
port: 7777
eureka:
client:
fetch-registry: true
register-with-eureka: true
service-url:
defaultZone: http://localhost:9999/eureka
spring:
application:
name: gateway-service
cloud:
gateway:
routes:
- id: test
uri: lb://MSA
predicates:
- Path=/test/**
curl 테스트
curl -X GET --location "http://localhost:7777/test"