View Code? Open in Web Editor
NEW
:boat: DDD企业级微服务架构 :sailboat:
ddd-springcloud's Introduction
🌴 Domain driven design 微服务(企业级)注册中心主架构
🍀 Eureka and Zuul Component
- 1:相对于互联网的(eureka->gateway->monitor->config->springboot)设计方式。
在领域驱动架构设计上可以很方便对每个建模的对象进行Events事件发起到触发或结束的监听。比如一个场景:建模了user,在某一个事件发起时,可以创建一个UserEvents,registerEvent到当前user里,那么在其他地方操作某一个事件并带了该用户,那么就可以拿到该建模用户里的注册事件的操作记录。
- 2:企业级并发量不高。Eureka负责提供注册,Zuul作为定期拉取注册中心存活的微服务,亦在Zuul网关里设置限流和负载异常捕获。
🌺 AuthClient and Springboot
- 1:AuthClient 作为一个Web做鉴权操作(Spring Security),拦截非login、auth等请求。
- 2:下层Springboot鉴权微服务提供正常读写库操作(如鉴权),提供方式用swagger.codegen对Controller功能生成ApiClient。
- 3:AuthClient 拿到下层鉴权的ApiClient做功能请求接入或者返回。
- 路由(Route)->控制器(Controller)->接口(Api)->服务(Service)->仓库(Repository)->工厂(Factory)->实体(Entity)
🌾 service = Springboot各个微服务组件
🍀 目前是简易swagger页面路径,需要慢慢完善(比如完整从基层到鉴权端输出调用方式 || 加swagger带Token注解):
ddd-springcloud's People
Stargazers
Watchers