# lock-spring **Repository Path**: aliang/lock-spring ## Basic Information - **Project Name**: lock-spring - **Description**: Spring integration for zookeeper lock - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: developer - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2015-12-20 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README lock-spring 解决了分布式系统下同步以及加锁的问题。通过zookeeper+curator进行资源锁控制.以及通过annotation+spring方式去实现使使用更加方便。 1. 下载source >下载[lock-spring.jar](https://github.com/zouyingchun/lock-spring/blob/developer/lib/lock-spring-1.0.0.jar) 2. spring annotation配置 >` ` 3. lockManager config >` ` 4. annontation config ```java @Lock(name="test",lockTime=60000) public void testLock() { logger.debug("start to test lock"); try { Thread.sleep(10000); } catch (InterruptedException e) { logger.info(e.getMessage(),e); } logger.debug("end to test lock"); } ``` 5. use example: 更加具体的使用方法请参考lock-example的使用。