通过redis锁,list以及配合消息队列实现商品普通下单流程和秒杀的架构设计代码在这https://github.com/ItsFunny/spring-test/tree/master/spring-test-order-and-stock
测试代码都在测试文件下,若无sql则在dao中更改自己的代码即可,记得修改MQ和redis
更新日志:
2019-03-28更:
不知道代码能不能运行,我也忘了…-.-,开始的时候是ok的,好像我后来改了点东西过
2019-01-23 更:
今天看原先的代码