Microservices architecture design using Zuul and Eureka - part 5
VIDEO:
Module
|
Used For
|
Module Type
|
Port
|
Registered Name
|
Dependencies added
|
zuul-module-service
|
API Gateway(Zuul Sever)
|
SpringBoot Module
|
9003
|
zuul-server
|
Web, Discovery Client,Zuul server
|
zuul-module-service
application.yml
server:
port: 9003
spring:
application:
name: zuul-server
eureka:
client:
serviceUrl:
defaultZone: http://localhost:9002/eureka/
zuul:
#Service will be mapped under the /api URI
prefix: /api
# Uncomment to disable auto-registering all services read from Eureka
# ignoredServices: '*'
# use url attribute to use service URL instead of serviceId
routes:
PRODUCTS-CRAWLER:
path: /crawler-service/**
serviceId: PRODUCTS-CRAWLER
PRODUCTS-DB:
path: /prducts-db-service/**
serviceId: PRODUCTS-DB
ZuulModuleServiceApplication.java
package com.sachin4java.zuulmoduleservice;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
@EnableZuulProxy
@EnableEurekaClient
@SpringBootApplication
public class ZuulModuleServiceApplication {
public static void main(String[] args) {
SpringApplication.run(ZuulModuleServiceApplication.class, args);
}
}
Module zuul-module-service --> https://github.com/ranesaci/zuul-module-service.git
No comments:
Post a Comment