Untitled
unknown
plain_text
a year ago
695 B
11
Indexable
@Bean
public RedissonConnectionFactory redissonConnectionFactory() throws IOException {
return new RedissonConnectionFactory(redissonClient());
}
@Bean(destroyMethod = "shutdown")
public RedissonClient redissonClient() throws IOException {
Config config = new Config();
config.useSingleServer()
.setSslEnableEndpointIdentification(false)
.setPassword(StringUtils.hasText(password) ? password : null)
.setAddress(master);
config.setCodec(new CompositeCodec(StringCodec.INSTANCE, new FstCodec(),
StringCodec.INSTANCE));
return Redisson.create(config);
}Editor is loading...
Leave a Comment