ruoyi配置redis
时间: 2023-10-28 17:05:26 浏览: 270
redis 配置
ruoyi配置redis需要进行以下两个步骤:
1. 在ruoyi-common项目的pom.xml文件中添加以下依赖:
```
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
<version>2.1.3.RELEASE</version>
</dependency>
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
<version>2.9.1</version>
</dependency>
```
2. 在application.yml文件中添加以下配置:
```
spring:
redis:
database: 0
host: localhost
port: 6379
password:
timeout: 6000ms
lettuce:
pool:
max-active: 1000
max-wait: -1ms
max-idle: 10
min-idle: 5
```
阅读全文