mall-swarm is a free, open source databases project written in Java and released under Apache-2.0. It has 13,147 GitHub stars, 5,530 forks and 10 open issues, and was last pushed 2 months ago. On this registry it ranks #61 of 143 tracked projects in Databases, with 5 head-to-head comparisons available.

What is mall-swarm?

mall-swarm is an open-source microservice e-commerce system built on Spring Cloud Alibaba and Spring Boot, intended for Java developers and teams that need a complete mall platform — registry, config center, gateway, monitoring and admin console included — instead of assembling that plumbing from scratch.

What it is

mall-swarm is a microservice shopping-mall system written in Java and released under the Apache-2.0 licence. Its core stack is Spring Cloud 2025 with Alibaba, Spring Boot 3.5, Sa-Token, MyBatis, Elasticsearch, Docker and Kubernetes, and it ships with a Vue-based admin console so a working system can be stood up quickly. The repository is organised as a set of Maven modules: mall-common for utility and shared code, mall-mbg for MyBatisGenerator-produced data-access code, mall-auth for unified authentication, mall-gateway for the API gateway, mall-monitor for monitoring, mall-admin for the back-office service, mall-search for Elasticsearch-backed product search, mall-portal for the mobile-facing mall service, mall-demo for remote-call testing, and a config directory holding the configuration served by the config center. Two front-end projects live alongside it: the Vue admin front end mall-admin-web and the mobile front end mall-app-web, which is built with uni-app.

The problem it addresses is integration, not e-commerce logic alone. A team building a mall on Spring Cloud would otherwise have to select and wire together a service registry, a configuration center, a monitoring center, an API gateway, an authentication center and a search service, then keep all of them consistent as the application grows. mall-swarm embeds those system functions into the project itself, on top of the e-commerce business code, so the infrastructure layer arrives already connected. The README also states that the project ships with complete documentation and a full set of accompanying Spring Cloud tutorials, which positions it as much as a reference implementation as a deployable base.

Key capabilities

  • Microservice topology split into mall-gateway (Spring Cloud Gateway), mall-auth, mall-admin, mall-portal, mall-search, mall-monitor and mall-demo, with mall-common and mall-mbg as shared libraries.
  • Authentication and authorisation through Sa-Token, with mall-auth documented as a unified authentication center based on Spring Security OAuth2.
  • Product search service mall-search, backed by Elasticsearch.
  • Monitoring center mall-monitor, built on Spring Boot Admin.
  • Persistence layer using MyBatis, MyBatisGenerator for data-layer code generation, the PageHelper physical pagination plugin and the Druid connection pool.
  • Supporting middleware including Redis for distributed cache, MongoDB as a NoSQL database, RabbitMQ as the message queue, Seata for global transaction management, and OSS or MinIO for object storage, with LogStash for log collection.
  • Container-oriented delivery using Docker and Kubernetes, with Jenkins for automated deployment and Portainer for visual Docker container management.

Who uses it and how

  • Teams evaluating the stack can use the hosted demonstrations: the admin console at cloud.macrozheng.com/admin/index.html and the storefront at the app demo address, which is best viewed in mobile browser mode.
  • Front-end developers pair the back end with mall-admin-web for the Vue and Element admin interface, or mall-app-web for the uni-app mobile client — both repositories are separate projects linked from the README.
  • Operators deploy the services as containers on Docker or Kubernetes, typically driving releases through Jenkins and inspecting running containers with Portainer.
  • Learners and instructors use the accompanying material: the mall-swarm microservice tutorial, the video course, and the separate springcloud-learning repository for Spring Cloud in general.
  • The repository carries roughly 13,000 stars and 5,500 forks, which indicates a wide base of readers and forkers rather than a small closed group.

Getting started

The README's environment setup table specifies JDK 17, MySQL 5.7 and Redis as the development environment, with the application modules built from source and deployed as containers through Docker or Kubernetes; the hosted demo at cloud.macrozheng.com is offered as the fastest way to try the system before installing anything.

How it compares

No competing or paid products are named in the facts provided, so no contrast can be drawn on licence, hosting or cost grounds. On the evidence available it stands alone in this registry.

When to use it — and when not to

A self-hoster must operate a substantial middleware estate: MySQL 5.7, Redis, MongoDB, RabbitMQ and Elasticsearch, plus Docker or Kubernetes and, for the documented deployment flow, Jenkins — so teams without container orchestration skills or without a reason to run Elasticsearch and a message queue should look elsewhere, and anyone wanting a single-process monolith will find this far heavier than needed. Two long-lived branches exist with different foundations — master on Spring Cloud 2025 and Spring Boot 3.5, dev-v2 on Spring Cloud 2021 and Spring Boot 2.7 — so the branch must be chosen deliberately before starting. One inconsistency is worth noting: the module list describes mall-auth as Spring Security OAuth2 based while the technology table lists Sa-Token for authentication and authorisation, and the supplied README excerpt stops partway through the environment table, so setup details should be confirmed against the full upstream documentation.

project readme (upstream, from github) — read inline

mall-swarm

公众号 交流 学习教程 后台项目 前端项目 前台商城项目 码云

友情提示

  1. 快速体验项目在线访问地址
  2. 全套学习教程《mall-swarm微服务学习教程》
  3. 视频教程《mall-swarm视频教程》
  4. Spring Cloud全套教程《SpringCloud学习教程》
  5. 分支说明master分支基于Spring Cloud 2025+Spring Boot 3.5,dev-v2分支基于Spring Cloud 2021+Spring Boot 2.7。

项目简介

mall-swarm是一套微服务商城系统,采用了 Spring Cloud 2025 & Alibaba、Spring Boot 3.5、Sa-Token、MyBatis、Elasticsearch、Docker、Kubernetes等核心技术,同时提供了基于Vue的管理后台方便快速搭建系统。mall-swarm在电商业务的基础集成了注册中心、配置中心、监控中心、网关等系统功能。文档齐全,附带全套Spring Cloud教程。

项目演示

后台管理系统

前端项目mall-admin-web地址:https://github.com/macrozheng/mall-admin-web

项目演示地址: https://www.macrozheng.com/admin/index.html

后台管理系统功能演示

前台商城系统

前端项目mall-app-web地址:https://github.com/macrozheng/mall-app-web

项目演示地址(将浏览器切换为手机模式效果更佳):https://www.macrozheng.com/app/

前台商城系统功能演示

项目架构

系统架构

系统架构图

业务架构

业务架构图

组织结构

mall
├── mall-common -- 工具类及通用代码模块
├── mall-mbg -- MyBatisGenerator生成的数据库操作代码模块
├── mall-auth -- 基于Spring Security Oauth2的统一的认证中心
├── mall-gateway -- 基于Spring Cloud Gateway的微服务API网关服务
├── mall-monitor -- 基于Spring Boot Admin的微服务监控中心
├── mall-admin -- 后台管理系统服务
├── mall-search -- 基于Elasticsearch的商品搜索系统服务
├── mall-portal -- 移动端商城系统服务
├── mall-demo -- 微服务远程调用测试服务
└── config -- 配置中心存储的配置

技术选型

后端技术

技术 说明 官网
Spring Cloud 微服务框架 https://spring.io/projects/spring-cloud
Spring Cloud Alibaba 微服务框架 https://github.com/alibaba/spring-cloud-alibaba
Spring Boot 容器+MVC框架 https://spring.io/projects/spring-boot
Sa-Token 认证和授权框架 https://github.com/dromara/Sa-Token
MyBatis ORM框架 http://www.mybatis.org/mybatis-3/zh/index.html
MyBatisGenerator 数据层代码生成 http://www.mybatis.org/generator/index.html
PageHelper MyBatis物理分页插件 http://git.oschina.net/free/Mybatis_PageHelper
Knife4j 文档生产工具 https://github.com/xiaoymin/swagger-bootstrap-ui
Elasticsearch 搜索引擎 https://github.com/elastic/elasticsearch
RabbitMq 消息队列 https://www.rabbitmq.com/
Redis 分布式缓存 https://redis.io/
MongoDb NoSql数据库 https://www.mongodb.com/
Docker 应用容器引擎 https://www.docker.com/
Druid 数据库连接池 https://github.com/alibaba/druid
OSS 对象存储 https://github.com/aliyun/aliyun-oss-java-sdk
MinIO 对象存储 https://github.com/minio/minio
LogStash 日志收集 https://github.com/logstash/logstash-logback-encoder
Lombok 简化对象封装工具 https://github.com/rzwitserloot/lombok
Seata 全局事务管理框架 https://github.com/seata/seata
Portainer 可视化Docker容器管理 https://github.com/portainer/portainer
Jenkins 自动化部署工具 https://github.com/jenkinsci/jenkins
Kubernetes 应用容器管理平台 https://kubernetes.io/

前端技术

技术 说明 官网
Vue 前端框架 https://vuejs.org/
Vue-router 路由框架 https://router.vuejs.org/
Vuex 全局状态管理框架 https://vuex.vuejs.org/
Element 前端UI框架 https://element.eleme.io/
Axios 前端HTTP框架 https://github.com/axios/axios
v-charts 基于Echarts的图表框架 https://v-charts.js.org/

移动端技术

技术 说明 官网
Vue 核心前端框架 https://vuejs.org
Vuex 全局状态管理框架 https://vuex.vuejs.org
uni-app 移动端前端框架 https://uniapp.dcloud.io
mix-mall 电商项目模板 https://ext.dcloud.net.cn/plugin?id=200
luch-request HTTP请求框架 https://github.com/lei-mu/luch-request

环境搭建

开发环境

搭建步骤

运行效果展示

公众号

加微信群交流,关注公众号「macrozheng」,回复「加群」即可。

公众号图片

许可证

Apache License 2.0

Copyright (c) 2018-2026 macrozheng

Frequently asked questions

Is mall-swarm free to use?

mall-swarm is open source under the Apache-2.0 licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does mall-swarm do?

mall-swarm是一套微服务商城系统,采用了 Spring Cloud Alibaba、Spring Boot 3.5、Sa-Token、MyBatis、Elasticsearch、Docker、Kubernetes等核心技术,同时提供了基于Vue的管理后台方便快速搭建系统。mall-swarm在电商业务的基础集成

What is mall-swarm written in?

mall-swarm is primarily written in Java. Its source is publicly available at https://github.com/macrozheng/mall-swarm, and it has 13,147 GitHub stars.