demo文件结构:
github地址:https://github.com/zxc1210449483/axondemo
开始调试:先在ProductController的commandGateway.sendAndWait(command)前打上端点,然后用postman发送POST请求:
http://127.0.0.1:8080/product/31?name=ttt&price=10&stock=100
F5单步调试进入DefaultCommandGateway的sendAndWait方法:
DefaultCommandGateway的作用:CommandGateway的默认