Skip to content

Spring Boot Microservices Application API Gateway, Service Registry, Circuit Breaker, Hystrix Dashboard, and Other Microservices

Notifications You must be signed in to change notification settings

cevheri/springboot-microservices-example

Repository files navigation

Java Spring-Boot Microservices Example

Light-weight sample for Microservices learning


  • Spring Boot version: 2.5.0
  • Dependencies:
    • spring-cloud-starter-netflix-eureka-server

Spring Boot version: 2.3.11.RELEASE

  • Dependencies:
    • spring-cloud-starter-gateway
    • spring-cloud-starter-netflix-hystrix
    • spring-cloud-starter-netflix-eureka-client
    • spring-cloud-starter-config

  • Spring Boot version: 2.5.0
  • GitHub repository -> application.yml
  • Dependencies:
    • spring-cloud-config-server
    • spring-cloud-starter-netflix-eureka-client
  • Zookeeper (not yet)

  • Spring Boot version: 2.3.11.RELEASE
  • Dependencies:
    • spring-cloud-starter-config
    • spring-cloud-starter-netflix-hystrix-dashboard
    • spring-cloud-starter-netflix-eureka-client

Other Microservices

  • Spring Boot version: 2.5.0
  • Person, Department, Task Management Services
  • Dependencies:
    • spring-cloud-starter-config
    • spring-cloud-starter-netflix-eureka-client
    • spring-cloud-starter-bootstrap
    • com.h2database.h2
    • org.projectlombok.lombok
    • spring-boot-starter-data-jpa
    • spring-boot-starter-web

Launch all service

$ docker-compose -f docker-compose/app.yml up -d

Zipkin

Docker The Docker Zipkin project is able to build docker images, provide scripts, and a docker-compose.yml for launching pre-built images. The quickest start is to run the latest image directly:

docker run -d -p 9411:9411 openzipkin/zipkin


Project Links:

Maven and Docker Build -> jib

$ cd service-registry && ./mvnw -Pprod clean verify jib:dockerBuild && cd ..
$ cd config-server && ./mvnw -Pprod clean verify jib:dockerBuild && cd ..
$ cd api-gateway && ./mvnw -Pprod clean verify jib:dockerBuild && cd ..
$ cd hystrix-dashboard && ./mvnw -Pprod clean verify jib:dockerBuild && cd ..
$ cd department-service && ./mvnw -Pprod clean verify jib:dockerBuild && cd ..
$ cd person-service && ./mvnw -Pprod clean verify jib:dockerBuild && cd ..
$ cd task-service && ./mvnw -Pprod clean verify jib:dockerBuild && cd ..

Run docker-compose

$ docker-compose -f docker-compose/app.yml up -d

Stop docker-compose

$ docker-compose -f docker-compose/app.yml down

Screenshots

All Microservices UP

References: