- Notifications
You must be signed in to change notification settings - Fork203
spring cloud最佳实践项目实例,使用了spring cloud全家桶,TCC事务管理,EDA事务最终一致性等技术的下单示例
License
lrwinx/shop
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
此商城项目,使用spring cloud 全家桶进行开发
事务处理使用两种:强一致性(TCC),最终一致性(EDA)
java 8 : 使用lambda表达式,简化写法
lombok : 简化java bean的写法
docker-maven-plugin : 直接生成Dockerfile (本地需更换成阿里云镜像,速度和成功率会提升很多)
H2 : 内存式数据库,减少DB依赖 (正式环境时,可以直接切换至MYSQL)
spring cloud eureka : 用于服务注册发现
spring data jpa : 数据库底层连接技术
spring mvc : 访问控制层技术
spring cloud robbin : 使用客户端负载均衡,进行服务提供者的调用
spring cloud feign : 分装了ribbon的使用,直接使用注解的方式,进行调用
spring boot actuate : spring boot项目的健康检查,此项目整合了应用服务的健康状态
spring security : 权限管理
spring cloud zuul : 网关服务,用来聚合和管理底层微服务接口
spring cloud config : 集中配置管理,整合各个微服务下的不同配置文件
spring cloud zipkin : 微服务调用监控系统,可以监听整个调用连
ByteTCC:TCC事务实现框架点击进入TCC的github地址
此项目分为四个核心模块:
用户模块(user-service):
积分模块(score-service):
产品模块(product-service):
订单模块(order-service):
{模块名}-service-api: 微服务的模块api定义
{模块名}-service-core: 微服务的模块业务逻辑实现
- author : Lrwin
- blog :http://lrwinx.github.io/
- email :dreamfly@126.com
- github :https://github.com/lrwinx
- city : TianJin