springboot或springcloud中配置redisson时,只需在pom.xml中添加依赖
xml
<dependency>
<groupId>org.redisson</groupId>
<artifactId>redisson</artifactId>
<version>3.13.6</version>
</dependency>
其次在application.yml中配置redis环境即可:
yaml
redis:
# 地址
host: localhost
# 端口,默认为6379
port: 6379
# 密码
password: dddd
# 连接超时时间
timeout: 10s