学习时间:6小时
代码量:280行(微服务架构)
博客量:1篇
核心学习内容:

服务拆分方案:

图表
代码
graph LR
A[API Gateway] --> B[User-Service]
A --> C[Book-Service]
A --> D[Borrow-Service]
Nacos服务注册:

yaml
spring:
cloud:
nacos:
discovery:
server-addr: 192.168.1.100:8848
关键决策:
❗ 选择基于业务能力拆分而非技术层级
调试问题:

服务间调用超时 → 配置Ribbon超时参数:

yaml
ribbon:
ReadTimeout: 5000
ConnectTimeout: 2000
明日计划:

OpenFeign声明式服务调用

Hystrix熔断机制