2020
11-22
11-22
Redis分布式锁的使用和实现原理详解
模拟一个电商里面下单减库存的场景。1.首先在redis里加入商品库存数量。2.新建一个SpringBoot项目,在pom里面引入相关的依赖。<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-data-redis</artifactId></dependency>3.接下来,在application.yml配...
继续阅读 >