cn.yueshutong:spring-boot-starter-redis-lock

Parent pom providing dependency and plugin management for applications built with Maven


Keywords
lua, redis
License
Apache-2.0

Documentation

spring-boot-starter-redis-lock

SnowJean项目的衍生品,使用非常简单,前提是你的spring boot已经集成并开启redis。

Maven

<dependency>
  <groupId>cn.yueshutong</groupId>
  <artifactId>spring-boot-starter-redis-lock</artifactId>
  <version>0.0.1.RELEASE</version>
</dependency>

Use

    @Autowired
    private RedisLock lock;

    //加锁
    lock.lock(key, value);
    
    //解锁
    lock.unlock(key, value);