Skip to content

☁️适合刚接触微服务架构的初学者了解和学习微服务,主要集成了注册中心、服务网关、配置中心、熔断机制、应用监控。

License

Notifications You must be signed in to change notification settings

coderqianlq/spring-cloud-learning

Repository files navigation

Spring-Cloud-Learning

Build Status License Coverage Status

README: English | 中文

spring-cloud-learning can be used as a project to learn microservices, and it's mainly contain service discovery, service gateway, configuration management, circuit breakers, application monitor.

Table of Contents

Components

  • Eureka
  • Consul
  • Ribbon
  • Feign
  • Hystrix
  • Turbine
  • Zuul
  • Spring Cloud Config
  • Spring Cloud Stream
  • Spring Cloud Bus
  • Spring Cloud Sleuth
  • Spring Cloud Security
  • Spring Cloud Task
  • Spring Cloud Gateway

To be supplemented...

Getting Started

Two methods will mainly introduced, but no matter what you need to clone the code.

$ git clone https://github.com/coderqianlq/spring-cloud-learning.git

Use directly (recommend)

You can use ide to import the project with maven, and use ide or use command line to start project.

$ mvn spring-boot:run

You can also package the code and run it.

$ java -jar xxx.jar

Use docker

First, you have to make sure you have installed docker and start docker server.

$ docker --version
Docker version 18.06.1-ce, build e68fc7a

Then, you need to enter each submodule and execute the docker building command.

$ cd eureka-server

$ mvn clean package -Pdocker docker:build

Next, return to the parent module and execute docker-compose command.

$ docker-compose up -d

Finally, you can open the registration center(default url: http://localhost:8761) to see if the service is registered successfully.

Preview

Spring boot admin wallboard

Spring Boot admin detail

Service customer hystrix stream

Hystrix monitor

Modules

- port remarks
admin-dashboard 8040 Spring boot Admin Dashboard for monitor spring cloud services
api-gateway 9090 Service gateway(Zuul)
config-server 8504 if you change the port, you need also modify bootstrap.yml of service-customer.
consul-server 8502 Service discovery(Consul)
eureka-server 8761 Service discovery(Eureka)
gateway-server 8080 Service gateway(Gateway)
hystrix-dashboard 8050
service-customer 8200 Integrated multiple components, including Feign, Spring Cloud Config, Spring Cloud Stream, Spring Cloud Bus
service-producer 8100
turbine-server 8060
zipkin-server 9411 if you change the port, you need also modify bootstrap.yml of service-customer.

Dependency Chart

Spring Boot Spring Cloud Spring Boot Admin Swagger2
2.1.5 Greenwich 2.1.6 2.7.0

Todo List

  • Split the module of service-customer.
  • Add the detailed usage of hystrix with turbine.
  • Update Spring Boot to 2.x and both Spring Cloud to Greenwich.
  • Add Spring Boot admin dashboard.
  • Use Spring Cloud Gateway replaces zuul as service gateway.

Collaborators


Marveliu

Joby1230

wxaaaa

License

MIT © CoderQian

About

☁️适合刚接触微服务架构的初学者了解和学习微服务,主要集成了注册中心、服务网关、配置中心、熔断机制、应用监控。

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published