Benefits of Redis
Performance. All Redis data resides in memory, which enables low latency and high throughput data access. ...
Flexible data structures. ...
Simplicity and ease-of-use. ...
Replication and persistence. ...
High availability and scalability. ...
Open Source.
xxxxxxxxxx
@Bean
JedisConnectionFactory jedisConnectionFactory() {
return new JedisConnectionFactory();
}
@Bean
public RedisTemplate<String, Object> redisTemplate() {
RedisTemplate<String, Object> template = new RedisTemplate<>();
template.setConnectionFactory(jedisConnectionFactory());
return template;
}