You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
redisson/redisson-spring-boot-starter/README.md

67 lines
1.9 KiB
Markdown

# Spring Boot Starter
6 years ago
Integrates Redisson with Spring Boot library. Depends on [Spring Data Redis](https://github.com/redisson/redisson/tree/master/redisson-spring-data#spring-data-redis-integration) module.
5 years ago
Supports Spring Boot 1.3.x - 2.3.x
6 years ago
<sub>Consider __[Redisson PRO](https://redisson.pro)__ version for advanced features and support by SLA.</sub>
6 years ago
## Usage
### 1. Add `redisson-spring-boot-starter` dependency into your project:
6 years ago
Maven
6 years ago
```xml
<dependency>
<groupId>org.redisson</groupId>
<artifactId>redisson-spring-boot-starter</artifactId>
5 years ago
<version>3.13.3</version>
</dependency>
6 years ago
```
6 years ago
Gradle
```groovy
5 years ago
compile 'org.redisson:redisson-spring-boot-starter:3.13.3'
```
5 years ago
5 years ago
Downgrade `redisson-spring-data` module if necessary to support required Spring Boot version:
5 years ago
5 years ago
|redisson-spring-data<br/>module name|Spring Boot<br/>version|
5 years ago
|----------------------------|-------------------|
|redisson-spring-data-16 |1.3.x |
|redisson-spring-data-17 |1.4.x |
|redisson-spring-data-18 |1.5.x |
|redisson-spring-data-20 |2.0.x |
|redisson-spring-data-21 |2.1.x |
|redisson-spring-data-22 |2.2.x |
5 years ago
|redisson-spring-data-23 |2.3.x |
5 years ago
7 years ago
### 2. Add settings into `application.settings` file
6 years ago
Common spring boot settings or Redisson settings could be used.
7 years ago
```properties
# common spring boot settings
spring.redis.database=
spring.redis.host=
spring.redis.port=
spring.redis.password=
spring.redis.ssl=
spring.redis.timeout=
spring.redis.cluster.nodes=
spring.redis.sentinel.master=
spring.redis.sentinel.nodes=
# Redisson settings
5 years ago
#path to config - redisson.yaml
7 years ago
spring.redis.redisson.config=classpath:redisson.yaml
```
6 years ago
### 3. Use Redisson through spring bean with `RedissonClient` interface or `RedisTemplate`/`ReactiveRedisTemplate` objects
6 years ago