Skip to content

whoooami/spring-cloud-microservice-world

Repository files navigation

MicroserviceWorld

Spring cloud microservice example.

include module:

  • discovery
  • gateway
  • config
  • reservation-service
  • reservation-client
  • hystrix-dashboard
  • monitor
  • zipkin
  • auth-server

How to run it?

  1. MacOS/Unix/Linux (/etc/hosts), windows (C:\Windows\System32\drivers\etc)
    127.0.0.1 config discovery zipkin
  2. install rabbitmq use brew.
    brew install rabbitmq.
  3. run it in order. discovery -> EurekaServiceApplication.java Show me
    config -> ConfigServiceApplication.java
    gateway -> ApiGatewayApplication.java
    auth-server -> AuthApplication.java
    reservation-service -> ReservationServiceApplication.java
    reservation-client -> ReservationClientApplication.java
    hystrix-dashboard -> HystrixDashboardApplication.java Show me
    monitor -> TurbineApplication.java Show me
    zipkin -> ZipkinApplication.java Show me
  4. You can run multi reservation-service and reservation-client test loadbalance with click this
    or apache bench [ab -c100 -n 10000 http://localhost:10000/reservation/hello]
    or Jmeter test it.
  5. How to run OAuth2 in auth-server.

hystrix_monitor

Reference

  1. Getting started with Spring Cloud by Josh Long
  2. This lab is references YouTube Getting Started with Spring Cloud, Thank you Dr. Dave Syer, Josh Long.[]
  3. Dive into Eureka – nobodyiam's blog
  4. About Spring cloud security OAuth2