代码拉取完成,页面将自动刷新
谷粒商城是尚硅谷雷丰阳老师教学的一套B2C商城项目,项目由业务集群系统+后台管理系统构成,打通了分布式开发及全栈开发技能,包含前后分离全栈开发、Restful接口、数据校验、网关、注册发现、配置中心、熔断、限流、降级、链路追踪、性能监控、压力测试、系统预警、集群部署、持续集成、持续部署等
项目结构:
gulimall
├── gulimall-common -- 工具类
├── renren-generator -- 代码生成器(人人开源项目)
├── renren-fast -- 后台管理系统(人人开源项目)
├── admin-vue -- 后台管理前端系统(人人开源项目)
├── gulimall-auth-server -- 认证中心(社交登录、OAuth2.0、单点登录)
├── gulimall-cart -- 购物车服务
├── gulimall-coupon -- 优惠卷服务
├── gulimall-member -- 会员服务
├── gulimall-gateway -- 网关服务
├── gulimall-order -- 订单服务
├── gulimall-product -- 商品服务
├── gulimall-search -- 检索服务
├── gulimall-seckill -- 秒杀服务
├── gulimall-third-party -- 第三方服务
└── gulimall-ware -- 仓储服务
后端技术
技术 | 说明 | 官网 |
---|---|---|
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 |
工具 | 说明 | 官网 |
---|---|---|
IDEA | 开发Java程序 | https://www.jetbrains.com/idea/download |
RedisDesktop | redis客户端连接工具 | https://redisdesktop.com/download |
SwitchHosts | 本地host管理 | https://oldj.github.io/SwitchHosts |
X-shell | Linux远程连接工具 | http://www.netsarang.com/download/software.html |
Navicat | 数据库连接工具 | http://www.formysql.com/xiazai.html |
PowerDesigner | 数据库设计工具 | http://powerdesigner.de |
Postman | API接口调试工具 | https://www.postman.com |
Jmeter | 性能压测工具 | https://jmeter.apache.org |
Typora | Markdown编辑器 | https://typora.io |
工具 | 版本号 | 下载 |
---|---|---|
JDK | 1.8 | https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html |
Mysql | 5.7 | https://www.mysql.com |
Redis | Redis | https://redis.io/download |
Elasticsearch | 7.6.2 | https://www.elastic.co/downloads |
Kibana | 7.6.2 | https://www.elastic.co/cn/kibana |
RabbitMQ | 3.8.5 | http://www.rabbitmq.com/download.html |
Nginx | 1.1.6 | http://nginx.org/en/download.html |
Windows环境部署
192.168.77.130 gulimall.com
192.168.77.130 search.gulimall.com
192.168.77.130 item.gulimall.com
192.168.77.130 auth.gulimall.com
192.168.77.130 cart.gulimall.com
192.168.77.130 order.gulimall.com
192.168.77.130 member.gulimall.com
192.168.77.130 seckill.gulimall.com
以上端口换成自己Linux的ip地址
1、在nginx.conf中添加负载均衡的配置
upstream gulimall {
server 192.168.43.182:88;
}
2、在gulimall.conf中添加如下配置
server {
listen 80;
server_name gulimall.com *.gulimall.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.gulimall.com; #不让请求头丢失
proxy_pass http://gulimall;
}
location / {
#root /usr/share/nginx/html;
#index index.html index.htm;
proxy_set_header Host $host; #不让请求头丢失
proxy_pass http://gulimall;
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。