本项目是个人学习微服务的第一个练手项目,从0到1完成搭建以及实现,由于本人尚学疏才浅,本项目仍存在还有诸多不足的地方,欢迎各位不吝赐教
tstx mall
项目是一套电商系统,包括前台系统与后台系统,基于微服务实现,采用Docker容器化部署。
项目特色:提供了相对完善的秒杀服务解决方案
秒杀服务:利用乐观锁和redis预库存解决超卖和超买,elatis-job定时上架秒杀商品,RocketMQ实现削峰填谷和超时订单,redis和mysql库存回补和利用canal保证一致性,利用webSocket与浏览器及时通信,seata保证分布式事务 具体细节见:(博客地址) 后台系统:用户管理(封解禁),商品管理(增删改查),订单管理,商品销量echarts可视化 支付服务:积分和支付宝支付以及退款 订单服务:下订单,取消订单 商品服务:评论,商品查询 用户服务:登陆注册,忘记密码
项目演示地址:尚在部署.....
ttsx
├──canal-boot -- canal客户端
├── ttsx-FlashKilling -- 秒杀模块
├── ttsx-background -- 后台服务模块
├── ttsx-entity -- 统一实体类管理模块
├── ttsx-feign -- 基于openfeign的远程调用模块
├── ttsx-foods -- 商品模块
├── ttsx-gateway -- 基于Spring Cloud Gateway的微服务API网关服务
├── ttsx-index -- 统一前端静态资源模块
├── ttsx-order -- 订单模块
├── ttsx-pay -- 支付模块
├── ttsx-scheduling -- 分布式任务调度模块
├── ttsx-user -- 用户模块
└── websocket-server -- 实时通信模块
技术 | 说明 | 官网 |
---|---|---|
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 |
MyBatis-plus | ORM框架 | http://www.mybatis.org/mybatis-3/zh/index.html |
RocketMQ | 消息队列 | https://rocketmq.apache.org/ |
Redis | 分布式缓存 | https://redis.io/ |
Docker | 应用容器引擎 | https://www.docker.com/ |
Druid | 数据库连接池 | https://github.com/alibaba/druid |
canal | 增量订阅&消费组件 | https://github.com/alibaba/canal |
elastic-job | 分布式任务调度 | https://shardingsphere.apache.org/elasticjob/index_zh.html |
JWT | JWT登录支持 | https://github.com/jwtk/jjwt |
nacos | 动态服务发现配置管理管理 | https://nacos.io/zh-cn/index.html |
Lombok | 简化对象封装工具 | https://github.com/rzwitserloot/lombok |
Seata | 全局事务管理框架 | https://github.com/seata/seata |
Portainer | 可视化Docker容器管理 | https://github.com/portainer/portainer |
mycat | 数据库中间件 | http://www.mycat.org.cn/ |
websocket | 即时通信服务 | https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API |
技术 | 说明 | 官网 |
---|---|---|
Vue | 前端框架 | https://vuejs.org/ |
Element | 前端UI框架 | https://element.eleme.io/ |
Axios | 前端HTTP框架 | https://github.com/axios/axios |
v-charts | 基于Echarts的图表框架 | https://v-charts.js.org/ |
工具 | 版本号 | 下载 |
---|---|---|
JDK | 1.8 | https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html |
Mysql | 8.0.11 | https://www.mysql.com/ |
Redis | 7.0.11 | https://redis.io/download |
canal | 1.1.4 | https://github.com/alibaba/canal/releases |
seata | 1.3.0 | https://seata.io/zh-cn/blog/download.html |
nacos | 2.2.1 | https://github.com/alibaba/nacos/releases |
RocketMQ | 4.5.2 | https://rocketmq.apache.org/zh/download |
elastic-job | 2.1.5 | https://shardingsphere.apache.org/elasticjob/current/cn/downloads/ |