The Spring Cloud tutorial, which took more than 2 months to complete, is now complete.

Introduction to the

This is a set of Spring Cloud tutorials covering the use of most of the core components, including Spring Cloud Alibaba and distributed transaction Seata, based on Spring Cloud Greenwich and SpringBoot 2.1.7. 20 articles, highlights and 30 demos covering most application scenarios.

Application scenarios

The registry

The registry is mainly used for service governance and provides the registration and discovery functions of services. Services in the micro-service architecture can be registered in the registry and obtain information about other services through the registry. Eureka, Consul, Nacos three solutions are available.

Configuration center

The configuration center provides unified external configuration management. Services in the microservice architecture can obtain configuration information from the configuration center and dynamically refresh configurations. Spring Cloud Config, Consul, Nacos three solutions are available.

API gateway

API gateway is mainly used to provide unified external access for services in microservices architecture, and realize request routing and filtering functions. Two solutions, Zuul and Gateway, are provided.

Load balancing

The Ribbon provides client load balancing functions for inter-service invocation. OpenFeign provides declarative inter-service invocation based on the Ribbon.

Fusing and current limiting

Fusing and current limiting are protection measures for services in microservice architecture. When faults occur in the system, they can be prevented from spreading. Hystrix and Sentinel solutions are available.

Security and protection

Spring Cloud Security provides a series of solutions for building secure SpringBoot applications. Combined with Oauth2, it can realize single sign-on, service Security protection and other functions, which can well protect the services in the microservice architecture.

The monitoring center

Spring Boot Admin in conjunction with Spring Cloud’s registry usage can be used to monitor services in the microservices architecture.

Distributed transaction resolution

In microservices architecture, Seata is a good solution to the distributed transaction problem that arises when a single business operation operates on multiple data sources or requires remote invocation.

directory

  • Overview of the overall architecture of Spring Cloud
  • Spring Cloud Eureka: Service registration and discovery
  • Spring Cloud Ribbon: Load balancing service invocation
  • Spring Cloud Hystrix: Service fault tolerance protection
  • Hystrix Dashboard: Circuit breaker execution monitoring
  • Spring Cloud OpenFeign: Declarative service invocation based on the Ribbon and Hystrix
  • Spring Cloud Zuul: API Gateway service
  • Spring Cloud Config: External centralized configuration management
  • Spring Cloud Bus: Message Bus
  • Spring Cloud Sleuth: Distributed request link tracing
  • Spring Cloud Consul: Service governance and configuration center
  • Spring Cloud Gateway: a new generation of API Gateway services
  • Spring Boot Admin: monitors microservice applications
  • Spring Cloud Security: Getting started with Oauth2
  • Spring Cloud Security: Oauth2 used with JWT
  • Spring Cloud Security: Oauth2 implements single sign-on
  • Spring Cloud Alibaba: Nacos is used as a registry and configuration center
  • Spring Cloud Alibaba: Sentinel realizes fusing and current limiting
  • Use Seata to completely solve the problem of distributed transactions in Spring Cloud
  • The correct posture for creating and starting SpringBoot applications in IDEA

The project structure

This tutorial comes with 30 demos, each of which has been carefully tested to ensure it runs flawlessly!

Springcloud - learning ├ ─ ─ eureka - server-- Eureka Registry├ ─ ─ eureka ws-security - server-- Eureka Registry with login authentication├ ─ ─ eureka - client-- Eureka client├ ─ ─ the user - service-- a service that provides the User object CRUD interface├ ─ ─ ribbon - serviceThe Ribbon service invokes the test service├ ─ ─ hystrix - serviceHystrix service calls the test service├ ─ ─ turbine - serviceAggregate services that collect hystrix instance monitoring information├ ─ ─ hystrix - dashboard-- A dashboard that displays hystrix instance monitoring information├ ─ ─ feign - service-- Feign service calls the test service├ ─ ─ zuul - proxy-- Zuul as gateway test service├ ─ ─config-server - Configure the center service├ ─ ─config-security-server -- Configuration center service with security authentication├ ─ ─config-client -- Get the configured client service├ ─ ─ consul -config-client -- Used to demonstrate Consul as consul's configuration center consul client├ ─ ─ consul - user - service-- A service registered with Consul that provides the User object CRUD interface├ ─ ─ consul - service-- Sign up for consul's Ribbon service to invoke the test service├ ─ ─ API - gateway-- gateway Tests the gateway├ ─ ─ the admin server. --- admin Monitoring center service├ ─ ─ the admin - client- Admin Indicates the application services monitored by the monitoring center├ ─ ─ the admin ws-security - server-- Admin monitoring center service with login authentication├ ─ ─ oauth2 - server-- OAUTH2 authentication test service├ ─ ─ oauth2 - JWT - server-- Use JWT's OAUTH2 authentication testing service├ ─ ─ oauth2 - clientOauth2 client service for single sign-on├ ─ ─ nacos -config-client The NACOS client used to demonstrate NACOS as a configuration hub├ ─ ─ nacos - user - serviceA service registered with NACOS that provides the CRUD interface to the User object├ ─ ─ nacos - ribbon - serviceRegister with nacOS's Ribbon service to invoke the test service├ ─ ─ sentinel - service-- Sentinel Functional Testing service├ ─ ─ seata - order - service-- Integrated seATA's order service├ ─ ─ seata - storage - service-- Integrated seATA inventory services└ ─ ─ seata - account - service-- Integrated seata account services
Copy the code

The project address

If you think this project is helpful, you can click Star to support it!

Github.com/macrozheng/…

The public,

Mall project full set of learning tutorials serialized, attention to the public number the first time access.