Created
August 25, 2020 10:53
-
-
Save cenkc/7b3050c10bb52379cf65d25c7e868000 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
************** Client java ************** | |
InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream("redis-conf.yaml"); | |
Config config = Config.fromYAML(is); | |
RedissonClient client = Redisson.create(config); | |
************** application.properties ************** | |
************** application.properties ************** | |
spring.redis.redisson.config=classpath:redis-conf.yaml | |
************** application.properties ************** | |
************** redis-conf.yaml ************** | |
--- | |
singleServerConfig: | |
idleConnectionTimeout: 10000 | |
connectTimeout: 10000 | |
timeout: 3000 | |
retryAttempts: 3 | |
retryInterval: 1500 | |
password: null | |
subscriptionsPerConnection: 5 | |
clientName: null | |
address: "redis://127.0.0.1:6379" | |
subscriptionConnectionMinimumIdleSize: 1 | |
subscriptionConnectionPoolSize: 50 | |
connectionMinimumIdleSize: 24 | |
connectionPoolSize: 64 | |
database: 0 | |
dnsMonitoringInterval: 5000 | |
threads: 16 | |
nettyThreads: 32 | |
codec: !<org.redisson.client.codec.StringCodec> {} | |
transportMode: "NIO" | |
************** redis-conf.yaml ************** |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment