SpringCloud微服务实战(四)-微服务中的服务拆分
- 订单服务源码 https://github.com/Wasabi1234/SpringCloud_OrderDemo
- 商品服务源码 https://github.com/Wasabi1234/SpringCloud_ProductDemo
- 商品服务模块全部源码 https://github.com/Wasabi1234/productdemo
# 4.1 微服务拆分的起点

# 4.2 康威定律和微服务

# 4.3 点餐业务服务拆分分析

# 4.4 商品服务API和SQL介绍

# 4.5 商品服务编码实战(上)
在 IDEA 中新建项目

- web 和 webflux
旧版只有web一种模式,默认使用web。新版需指定,新增依赖
org.springframework.boot.spring-boot-starter-web
启动该类,将此服务注册到 eureka 上去
开始单元测试
开始编码第二个功能

# 4.6 商品服务编码实战(中)
编码技巧,测试类可以直接继承启动类的测试类,减少注解个数,做到了最大可能的解耦
编写 vo 包下的类

# 4.7 商品服务编码实战(下)
完成 controller 类
启动程序

# 4.8 订单服务API和sql介绍

# 4.9 订单服务dao

启动

# 4.10 订单服务service

# 4.11 订单服务controller

# 4.12 再看拆数据

Last Updated: 2023/02/14, 18:02:00