springboot引入redisson使用分布式锁
网址:https://github.com/redisson/redisson/
1.加依赖(pom.xml)
<dependency>
<groupId>org.redisson</groupId>
<artifactId>redisson</artifactId>
<version>3.14.1</version>
</dependency>
2.配置
package com.example.demo.config;
import org.redisson.Redisson;
import org.redisson.api.RedissonClient;
import org.redisson.config.Config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public

最低0.47元/天 解锁文章
2425

被折叠的 条评论
为什么被折叠?



