springcloud-learning
Introduction
The latest microservice practical tutorial in 2024, comprehensive analysis of Spring Cloud components, microservice project practice, and Kubernetes container deployment. This tutorial is based on the mall-swarm microservice e-commerce project.
mall-swarm
project (11k+star) is a microservice mall system that uses core technologies such as Spring Cloud 2023 & Alibaba, Spring Boot 3.2, Sa-Token, MyBatis, Elasticsearch, Docker, and Kubernetes, and also provides Vue-based The management background facilitates and quickly builds the system. mall-swarm
integrates system functions such as registration center, configuration center, monitoring center, and gateway on the basis of e-commerce business. The documentation is complete and comes with a full set of Spring Cloud tutorials.
tutorial website
- mall-swarm project address: https://github.com/macrozheng/mall-swarm
- Tutorial document website: https://cloud.macrozheng.com
Table of contents
Prologue
Introduce the structure, business, learning requirements and learning ideas of the mall-swarm project.
- Overview of mall-swarm project architecture and functions
- Mall-swarm project core function demonstration
- Knowledge points required for learning the mall-swarm project
- Mall-swarm microservice learning tutorial content introduction
quick start
Explain the development environment construction of the front-end and back-end of the mall-swarm project under Windows and its deployment under Linux.
- Mall-swarm project back-end development environment construction
- Building mall-swarm front-end development environment
- Install Linux using a virtual machine
- Docker environment installation and common commands
- Deployment of mall-swarm in Linux environment (based on Docker container)
- The front-end project connects to the mall-swarm backend deployed on Linux
Components
Explain the full set of core components of Spring Cloud, covering Spring Cloud Alibaba, Spring Authorization Server and SkyWalking, based on Spring Cloud 2023.
- Introduction to Spring Cloud Microservice Components
- Spring Cloud Alibaba: Nacos is used as a registration center and configuration center
- Spring Cloud Eureka: Service Registration and Discovery
- Spring Cloud Consul: Service Governance and Configuration Center
- Spring Cloud Zookeeper: Service Governance and Configuration Center
- Spring Cloud Config: External centralized configuration management
- Spring Cloud Bus: message bus
- Spring Cloud Stream: Building message-driven microservice applications
- Spring Cloud LoadBalancer: Load balanced service calls
- Spring Cloud OpenFeign: Declarative service invocation
- Spring Cloud Alibaba: Sentinel implements circuit breaker and current limiting
- Spring Cloud Circuit Breaker: Service Fault Tolerance Protection
- Spring Cloud Gateway: API gateway service
- Spring Cloud Alibaba: Using Seata to solve distributed transaction problems
- Spring Authorization Server: Implementing OAuth2 authentication service
- Spring Authorization Server: Implement custom JWT content and exception response
- Spring Authorization Server: Implementing OAuth2 client
- Spring Authorization Server: Implementing OAuth2 resource service
- Spring Authorization Server: Microservice permission solution based on Gateway and Oauth2
- SkyWalking: Microservice request link tracking
Architecture
Based on the Spring Boot single application scaffolding mall-tiny, a microservice project scaffolding used by the mall-swarm project is gradually built.
- Introduction to mall-swarm architecture
- mall-tiny project introduction
- SpringDoc usage tutorial
- mall-tiny integrates SpringDoc to implement online API documentation
- The mall-tiny project is split into multiple modules
- The mall-swarm-tiny project integrates the registration center and gateway
- Microservice document aggregation solution: based on Nacos+Gateway+Knife4j
- The mall-swarm-tiny project integrates Knife4j to implement gateway aggregation documents
- Sa-Token usage tutorial
- Microservice permission solution: based on Nacos+Gateway+Sa-Token
- mall-swarm-tiny integrates Sa-Token to implement authentication and authorization functions
- Spring Boot Admin: Microservice application monitoring
- mall-swarm-tiny integrates Admin to implement microservice monitoring
- Introduction to the backend code structure of the mall-swarm project
- Mall-swarm project back-end core code explanation
- How to develop interfaces and menus in the mall-swarm project
K8S articles
Comprehensively explain the use of Kubernetes, and implement the deployment of mall-swarm projects in the Kubernetes environment based on the enterprise-level container management platform KubeSphere.
- Introduction to K8S
- K8S Getting Started Tutorial
- Advanced use of K8S
- Deployment of SpringBoot application in K8S environment
- Use of enterprise-level container management platform KubeSphere
- Deployment of mall-swarm in K8S environment