Commit 9d5b9120 authored by Ali Saeed's avatar Ali Saeed

Added API Gateway Configuration

parent bd86541a
......@@ -2,7 +2,10 @@ package org.example;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
@SpringBootApplication
@EnableDiscoveryClient
public class CloudGatewayApplication {
public static void main(String[] args) {
SpringApplication.run(CloudGatewayApplication.class, args);
......
server:
port: 9090
spring:
application:
name: api-gateway
cloud:
gateway:
routes:
- id: invoicing-service
uri: lb://invoicing-service
predicates:
- Path=/invoices/**
- id: users-service
uri: lb://users-service
predicates:
- Path=/users/**
eureka:
client:
register-with-eureka: true
fetch-registry: true
service-url:
default-zone: http://localhost:8761/eureka/
# instance:
# hostname: localhost
# preferIpAddress: true
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment