
Artifact와 Name을 api-gateway-service라고 지어주자. Package name을 Java 컨벤션에 맞게 apigatewayservice라고 지어주자.Spring Boot DevTools, Reactive Gateway를 선택하자. 이 프로젝트에서는application.properties를 지우고application.yml을 생성했다.
server: port: 8000 spring: cloud: gateway: server: webflux: routes: # /users로 시작하는 모든 경로의 요청은 user-service(localhost:8080)으로 전달 - id: user-service uri: http://localhost:8080 predicates: - Path=/users/** # /boards로 시작하는 모든 경로의 요청은 board-service(localhost:8081)으로 전달 - id: board-service uri: http://localhost:8081 predicates: - Path=/boards/** # /points로 시작하는 모든 경로의 요청은 point-service(localhost:8082)으로 전달 - id: point-service uri: http://localhost:8082 predicates: - Path=/points/**
id : 각 라우팅 식별자uri : 클라이언트로부터 받은 요청을 전달할 주소predicates : 어떤 요청에 대해 특정 서비스로 요청을 전달할 지 패턴을 지정

