# yumall **Repository Path**: pro-codes/yumall ## Basic Information - **Project Name**: yumall - **Description**: 商城项目 - **Primary Language**: Java - **License**: Apache-2.0 - **Default Branch**: v3.0.0 - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-12-06 - **Last Updated**: 2023-04-24 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # yumall ## 介绍 商城项目+集群篇
## 组织结构
```
yumall
├── yumall-common -- 工具类及通用代码
├── renren-generator -- 人人开源项目的代码生成器
├── yumall-auth-server -- 认证中心(社交登录、OAuth2.0、单点登录)
├── yumall-cart -- 购物车服务
├── yumall-coupon -- 优惠卷服务
├── yumall-gateway -- 统一配置网关
├── yumall-order -- 订单服务
├── yumall-product -- 商品服务
├── yumall-search -- 检索服务
├── yumall-seckill -- 秒杀服务
├── yumall-third-party -- 第三方服务
├── yumall-ware -- 仓储服务
└── yumall-member -- 会员服务
```
## 技术选型
**后端技术**
| 技术 | 说明 | 官网 |
| :----------------: | :----------------------: | :---------------------------------------------: |
| SpringBoot | 容器+MVC框架 | https://spring.io/projects/spring-boot |
| SpringCloud | 微服务架构 | https://spring.io/projects/spring-cloud |
| SpringCloudAlibaba | 一系列组件 | https://spring.io/projects/spring-cloud-alibaba |
| MyBatis-Plus | ORM框架 | https://mp.baomidou.com |
| renren-generator | 人人开源项目的代码生成器 | https://gitee.com/renrenio/renren-generator |
| Elasticsearch | 搜索引擎 | https://github.com/elastic/elasticsearch |
| RabbitMQ | 消息队列 | https://www.rabbitmq.com |
| Springsession | 分布式缓存 | https://projects.spring.io/spring-session |
| Redisson | 分布式锁 | https://github.com/redisson/redisson |
| Docker | 应用容器引擎 | https://www.docker.com |
| OSS | 对象云存储 | https://github.com/aliyun/aliyun-oss-java-sdk |
**前端技术**
| 技术 | 说明 | 官网 |
| :-------: | :--------: | :-----------------------: |
| Vue | 前端框架 | https://vuejs.org |
| Element | 前端UI框架 | https://element.eleme.io |
| thymeleaf | 模板引擎 | https://www.thymeleaf.org |
| node.js | 服务端的js | https://nodejs.org/en |
## 架构图
**系统架构图**
[](https://imgchr.com/i/UUvRAS)
**业务架构图**

## 环境搭建
### 开发环境
| 工具 | 版本号 | 下载 |
| :-----------: | :----: | :----------------------------------------------------------: |
| JDK | 11.0.+ | https://www.oracle.com/java/technologies/downloads/#java11
阿里云盘:https://www.aliyundrive.com/s/amwEBMKVZNL
https://www.aliyundrive.com/s/1A1VSER5Eet/folder/616c07a23f83870f2ab44ee38663d186010f3a34 |
| Mysql | 5.7 | https://www.mysql.com |
| Redis | buster | https://redis.io/download |
| Elasticsearch | 7.14.0 | https://www.elastic.co/downloads |
| Kibana | 7.14.0 | https://www.elastic.co/cn/kibana |
| RabbitMQ | 3.8.5 | http://www.rabbitmq.com/download.html |
| Nginx | 1.20.1 | http://nginx.org/en/download.html |
| k8s | 1.22 | https://kubernetes.io/zh/ |
| kubesphere | 3.2.0 | https://kubesphere.com.cn/docs/ |
> 注意:以上的除了jdk,Nginx都是采用docker方式进行安装,详细安装步骤可参考百度!!!
### 搭建步骤
> Windows环境部署
- 修改本机的host文件,映射域名端口
```
127.0.0.1 yumall.com
127.0.0.1 search.yumall.com
127.0.0.1 item.yumall.com
127.0.0.1 auth.yumall.com
127.0.0.1 cart.yumall.com
127.0.0.1 order.yumall.com
127.0.0.1 member.yumall.com
127.0.0.1 seckill.yumall.com
以上端口换成自己的ip地址
```
- 修改Linux中Nginx的配置文件
```
1、在nginx.conf中添加负载均衡的配置
upstream yumall {
server 127.0.0.1:50000;
}
2、在gulimall.conf中添加如下配置
server {
listen 80;
server_name yumall.com *.yumall.com hjl.mynatapp.cc;
#charset koi8-r;
#access_log /var/log/nginx/log/host.access.log main;
#配置静态资源的动态分离
location ~/static/ {
root /usr/share/nginx/html;
}
#支付异步回调的一个配置
location /payed/ {
proxy_set_header Host order.yumall.com; #不让请求头丢失
proxy_pass http://yumall;
}
location / {
proxy_set_header Host $host; #不让请求头丢失
proxy_pass http://yumall;
}
```
- 克隆前端项目 `renren-fast-vue` 以 `npm run dev` 方式去运行
- 克隆整个后端项目 `gulimall` ,并导入 IDEA 中完成编译