DWQA Questions › Category: Database › Redis: what's the difference between jedis and redistemplate?
esolve asked 1 year ago
How to choose to use?
3 Answers
Su Sheng answered 1 year ago
Jedis is officially recommended by redis as a Java oriented client to operate redis, while redistemplate is a high encapsulation of jedisapi in spring data redis.
Compared with jedis, spring data redis can easily replace the Java client of redis, which has more features of automatic connection pool management than jedis, and is easy to use with other spring frameworks, such as spring cache
Ink is sweet answered 1 year ago
Redistemplate is a template for using redis in spring data redis.
Jedisconnectionfactory is a factory class for spring data redis to use redis through jedis.
That is to say, spring uses redis through redistemplate and gets it through jedis.
anysoft answered 1 year ago
Jedis is an official framework for redis to encapsulate the Java operation redis API.
Redistemplate is the encapsulation of jedis and lettuce by spring framework. So that the spring framework system can be more convenient access to the function of redis.
Redistemplate supports jedis and lettuce