redisson-spring-boot-starter配置

吴子昂
2023-12-01

1、pom


        <dependency>
            <groupId>org.redisson</groupId>
            <artifactId>redisson-spring-boot-starter</artifactId>
            <version>3.15.1</version>
        </dependency>

2、redis配置文件

spring:
  redis:
    redisson:
      config: |
        singleServerConfig:
          idleConnectionTimeout: 10000
          connectTimeout: 10000
          timeout: 3000
          retryAttempts: 3
          retryInterval: 1500
          address: redis://192.168.5.174:6379
          password: ld123456
          clientName: null
          keepAlive: false
          tcpNoDelay: false
        threads: 16
        nettyThreads: 32
        codec: !<org.redisson.codec.JsonJacksonCodec> {}
        transportMode: "NIO"

server:
  port: 8080

 

 类似资料: