How to Quickly Master a Spring Cloud Microservices Project with Mall‑Swarm
This guide walks you through the entire Mall‑Swarm microservices e‑commerce project—covering setup, core Spring Cloud components, scaffolding, Kubernetes deployment, and extending functionality—so newcomers can confidently tackle a real‑world microservice system.
Many developers feel uneasy when they join a new company and encounter a microservices project after only working with monoliths. Using the Mall‑Swarm e‑commerce example, this article shows how to quickly get up to speed.
Mall‑Swarm Project Overview
Mall‑Swarm (over 11k GitHub stars) is a microservice‑based online store built with the latest 2024 stack: Spring Cloud Alibaba, Spring Boot 3.2, JDK 17, Kubernetes and more. It integrates registration, configuration, monitoring, and gateway services.
GitHub: https://github.com/macrozheng/mall-swarm
Gitee: https://gitee.com/macrozheng/mall-swarm
Documentation site: https://cloud.macrozheng.com
Running the Project
The first step is to get the project running. Follow the "mall‑swarm microservice learning tutorial" quick‑start guide to set up the development environment.
The backend setup adds only a Nacos component compared with the older Mall project.
The frontend setup simply points API requests to the gateway.
Familiarizing Project Features
After deployment, explore the admin and storefront to understand business logic.
Demo links: admin https://www.macrozheng.com/admin/ , storefront https://www.macrozheng.com/app/ .
Learning Core Spring Cloud Components
Spring Cloud microservices are composed of multiple Spring Boot applications; mastering the core components is essential.
The current version is Spring Cloud 2023. Key components include:
Spring Cloud Core
Eureka – service registry
Consul – service governance and config
Zookeeper – service governance and config
Gateway – API gateway
Circuit Breaker – fault tolerance
Config – centralized configuration
Bus – distributed messaging
LoadBalancer – client‑side load balancing
OpenFeign – declarative HTTP client
Stream – event‑driven messaging
Spring Cloud Alibaba Core
Nacos – registry and configuration
Sentinel – flow control and circuit breaking
Seata – distributed transaction solution
The accompanying tutorial also covers Spring Authorization Server and SkyWalking for tracing.
Building a Microservice Scaffold
After learning the components, create a scaffold that bundles all required technologies for rapid reuse.
The stack used by Mall‑Swarm includes:
Spring Cloud 2023.0.1
Spring Cloud Alibaba 2023.0.1.0
Spring Boot 3.2.2
Sa‑Token 1.37.0
MyBatis 3.5.14
MyBatisGenerator 1.4.2
PageHelper 6.1.0
Knife4j 4.5.0
Elasticsearch 7.17.3
Logstash 7.17.3
Kibana 7.17.3
RabbitMQ 3.10.5
Redis 7.0
MongoDB 5.0
Druid 1.2.9
MinIO 8.4.5
Seata 2.0.0
Kubernetes 1.29
Deploying the Project on Kubernetes
Kubernetes (K8s) is the de‑facto container orchestration platform for production microservices.
The tutorial shows how to use the enterprise‑grade KubeSphere platform to deploy Mall‑Swarm.
Extending the Project with New Features
Once the scaffold and deployment are mastered, adding business features follows the same pattern as in monolithic applications.
Summary
For newcomers to microservices, follow these steps:
Run the project using the deployment guide.
Explore the admin and storefront to understand business logic.
Study core Spring Cloud components.
Build a reusable microservice scaffold.
Deploy the application on Kubernetes.
Extend the codebase with new business requirements.
Project Links
https://github.com/macrozheng/mall-swarm
The repository has over 11K stars and a complete 2024 video tutorial series (~26 hours, 59 episodes) covering the latest microservice stack.
Recommended Reading
Spring Cloud + K8s Microservice Practice
Upgrade to Spring Boot 3 + JDK 17
Top Open‑Source E‑Commerce System
Comprehensive Java Tech Tutorial
Designing Cart, Order, and Payment
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
macrozheng
Dedicated to Java tech sharing and dissecting top open-source projects. Topics include Spring Boot, Spring Cloud, Docker, Kubernetes and more. Author’s GitHub project “mall” has 50K+ stars.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
