Untitled
Anonymous
plain_text
08/30/2024 4:14 AM
928 B
23
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