AI prompts
base on mall-swarm是一套微服务商城系统,采用了 Spring Cloud Alibaba、Spring Boot 3.2、Sa-Token、MyBatis、Elasticsearch、Docker、Kubernetes等核心技术,同时提供了基于Vue的管理后台方便快速搭建系统。mall-swarm在电商业务的基础集成了注册中心、配置中心、监控中心、网关等系统功能。 # mall-swarm
<p>
<a href="#公众号"><img src="http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/badge/%E5%85%AC%E4%BC%97%E5%8F%B7-macrozheng-blue.svg" alt="公众号"></a>
<a href="#公众号"><img src="http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/badge/%E4%BA%A4%E6%B5%81-%E5%BE%AE%E4%BF%A1%E7%BE%A4-2BA245.svg" alt="交流"></a>
<a href="https://github.com/macrozheng/mall-learning"><img src="http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/badge/%E5%AD%A6%E4%B9%A0%E6%95%99%E7%A8%8B-mall--learning-green.svg" alt="学习教程"></a>
<a href="https://github.com/macrozheng/mall"><img src="http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/badge/%E5%90%8E%E5%8F%B0%E9%A1%B9%E7%9B%AE-mall-blue.svg" alt="后台项目"></a>
<a href="https://github.com/macrozheng/mall-admin-web"><img src="http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/badge/%E5%89%8D%E7%AB%AF%E9%A1%B9%E7%9B%AE-mall--admin--web-green.svg" alt="前端项目"></a>
<a href="https://github.com/macrozheng/mall-app-web"><img src="https://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/badge/%E5%89%8D%E5%8F%B0%E5%95%86%E5%9F%8E%E9%A1%B9%E7%9B%AE-mall--app--web-green.svg" alt="前台商城项目"></a>
<a href="https://gitee.com/macrozheng/mall-swarm"><img src="http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/badge/%E7%A0%81%E4%BA%91-%E9%A1%B9%E7%9B%AE%E5%9C%B0%E5%9D%80-orange.svg" alt="码云"></a>
</p>
## 友情提示
> 1. **快速体验项目**:[在线访问地址](https://cloud.macrozheng.com/admin/index.html) 。
> 2. **全套学习教程**:[《mall-swarm微服务学习教程》](https://cloud.macrozheng.com) 。
> 3. **视频教程(2024最新版)**:[《mall-swarm视频教程》](https://cloud.macrozheng.com/video/) 。
> 4. **Spring Cloud全套教程**:[《SpringCloud学习教程》](https://github.com/macrozheng/springcloud-learning) 。
> 5. **分支说明**:`master`分支基于Spring Cloud 2023+Spring Boot 3.2,`dev-v2`分支基于Spring Cloud 2021+Spring Boot 2.7。
## 项目简介
`mall-swarm`是一套微服务商城系统,采用了 Spring Cloud 2023 & Alibaba、Spring Boot 3.2、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](https://www.macrozheng.com/admin/index.html)
![后台管理系统功能演示](./document/resource/mall_admin_show.png)
### 前台商城系统
前端项目`mall-app-web`地址:https://github.com/macrozheng/mall-app-web
项目演示地址(将浏览器切换为手机模式效果更佳):[https://www.macrozheng.com/app/](https://www.macrozheng.com/app/)
![前台商城系统功能演示](./document/resource/re_mall_app_show.jpg)
## 项目架构
### 系统架构
![系统架构图](./document/resource/mall_micro_service_arch.jpg)
### 业务架构
![业务架构图](./document/resource/re_mall_business_arch.jpg)
### 组织结构
``` lua
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 |
## 环境搭建
### 开发环境
| 工具 | 版本号 | 下载 |
| ------------- | ------ | ------------------------------------------------------------ |
| JDK | 17 | https://www.oracle.com/cn/java/technologies/downloads/#java17 |
| Mysql | 5.7 | https://www.mysql.com/ |
| Redis | 7.0 | https://redis.io/download |
| Elasticsearch | 7.17.3 | https://www.elastic.co/cn/downloads/elasticsearch |
| Kibana | 7.17.3 | https://www.elastic.co/cn/downloads/kibana |
| Logstash | 7.17.3 | https://www.elastic.co/cn/downloads/logstash |
| MongoDb | 5.0 | https://www.mongodb.com/download-center |
| RabbitMq | 3.10.5 | http://www.rabbitmq.com/download.html |
| nginx | 1.22 | http://nginx.org/en/download.html |
### 搭建步骤
- Windows环境搭建请参考:[mall-swarm项目后端开发环境搭建](https://cloud.macrozheng.com/start/mall_swarm_deploy_windows.html);
- `mall-admin-web`项目的安装及部署请参考:[mall-swarm前端开发环境搭建](https://cloud.macrozheng.com/start/mall_swarm_deploy_windows_web.html);
## 运行效果展示
- 查看注册中心注册服务信息,访问地址:http://192.168.3.101:8848/nacos/
![](./document/resource/re_mall_swarm_run_01.png)
- 监控中心应用信息,访问地址:http://192.168.3.101:8101
![](./document/resource/re_mall_swarm_run_02.png)
![](./document/resource/re_mall_swarm_run_03.png)
- API文档信息,访问地址:http://192.168.3.101:8201
![](./document/resource/re_mall_swarm_run_04.png)
- 日志收集系统信息,访问地址:http://192.168.3.101:5601
![](./document/resource/re_mall_swarm_run_05.png)
- 使用Kubernetes部署后项目运行状态,访问地址:http://192.168.3.101:30880
![](document/resource/re_mall_swarm_run_06.png)
![](document/resource/re_mall_swarm_run_07.png)
## 公众号
加微信群交流,关注公众号「**macrozheng**」,回复「**加群**」即可。
![公众号图片](http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/banner/qrcode_for_macrozheng_258.jpg)
## 许可证
[Apache License 2.0](https://github.com/macrozheng/mall-swarm/blob/master/LICENSE)
Copyright (c) 2018-2024 macrozheng", Assign "at most 3 tags" to the expected json: {"id":"3498","tags":[]} "only from the tags list I provide: [{"id":77,"name":"3d"},{"id":89,"name":"agent"},{"id":17,"name":"ai"},{"id":54,"name":"algorithm"},{"id":24,"name":"api"},{"id":44,"name":"authentication"},{"id":3,"name":"aws"},{"id":27,"name":"backend"},{"id":60,"name":"benchmark"},{"id":72,"name":"best-practices"},{"id":39,"name":"bitcoin"},{"id":37,"name":"blockchain"},{"id":1,"name":"blog"},{"id":45,"name":"bundler"},{"id":58,"name":"cache"},{"id":21,"name":"chat"},{"id":49,"name":"cicd"},{"id":4,"name":"cli"},{"id":64,"name":"cloud-native"},{"id":48,"name":"cms"},{"id":61,"name":"compiler"},{"id":68,"name":"containerization"},{"id":92,"name":"crm"},{"id":34,"name":"data"},{"id":47,"name":"database"},{"id":8,"name":"declarative-gui "},{"id":9,"name":"deploy-tool"},{"id":53,"name":"desktop-app"},{"id":6,"name":"dev-exp-lib"},{"id":59,"name":"dev-tool"},{"id":13,"name":"ecommerce"},{"id":26,"name":"editor"},{"id":66,"name":"emulator"},{"id":62,"name":"filesystem"},{"id":80,"name":"finance"},{"id":15,"name":"firmware"},{"id":73,"name":"for-fun"},{"id":2,"name":"framework"},{"id":11,"name":"frontend"},{"id":22,"name":"game"},{"id":81,"name":"game-engine "},{"id":23,"name":"graphql"},{"id":84,"name":"gui"},{"id":91,"name":"http"},{"id":5,"name":"http-client"},{"id":51,"name":"iac"},{"id":30,"name":"ide"},{"id":78,"name":"iot"},{"id":40,"name":"json"},{"id":83,"name":"julian"},{"id":38,"name":"k8s"},{"id":31,"name":"language"},{"id":10,"name":"learning-resource"},{"id":33,"name":"lib"},{"id":41,"name":"linter"},{"id":28,"name":"lms"},{"id":16,"name":"logging"},{"id":76,"name":"low-code"},{"id":90,"name":"message-queue"},{"id":42,"name":"mobile-app"},{"id":18,"name":"monitoring"},{"id":36,"name":"networking"},{"id":7,"name":"node-version"},{"id":55,"name":"nosql"},{"id":57,"name":"observability"},{"id":46,"name":"orm"},{"id":52,"name":"os"},{"id":14,"name":"parser"},{"id":74,"name":"react"},{"id":82,"name":"real-time"},{"id":56,"name":"robot"},{"id":65,"name":"runtime"},{"id":32,"name":"sdk"},{"id":71,"name":"search"},{"id":63,"name":"secrets"},{"id":25,"name":"security"},{"id":85,"name":"server"},{"id":86,"name":"serverless"},{"id":70,"name":"storage"},{"id":75,"name":"system-design"},{"id":79,"name":"terminal"},{"id":29,"name":"testing"},{"id":12,"name":"ui"},{"id":50,"name":"ux"},{"id":88,"name":"video"},{"id":20,"name":"web-app"},{"id":35,"name":"web-server"},{"id":43,"name":"webassembly"},{"id":69,"name":"workflow"},{"id":87,"name":"yaml"}]" returns me the "expected json"