# distributed-lock **Repository Path**: zxm-lucky/distributed-lock ## Basic Information - **Project Name**: distributed-lock - **Description**: 编写一个分布式锁的框架 - **Primary Language**: Java - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2019-03-01 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # distributed-lock 基于spring boot 2.1.2 RELEASE 实现的redis 分布式锁。 为兼容多方式的使用。实现了注解式 和 编程式 引用。 #### 注解式: 在目标方法上添加 @RedisLockAction 注解 。 里面的key 可支持 SpEL 表达式。 #### 编程式: 将 DistributedLock 注入到你自己的Bean 中即可。 如: @Autowired private DistributedLock distributedLock; Maven依赖方式: #### <dependency> #### <groupId>com.snowruin</groupId> #### <artifactId>redis-lock-spring-boot-starter</artifactId> #### <version>1.0</version> #### </dependency> 后续会有其他的实现方式.