What is the difference between Redis: Jedis and RedisTemplate?

how do I choose to use it?

Mar.13,2021

Jedis is a client officially recommended by Redis for operating Redis for Java, while RedisTemplate is a high encapsulation of JedisApi in SpringDataRedis.
SpringDataRedis can easily replace the Java client of Redis compared to Jedis. It has more features of automatically managing connection pooling than Jedis, and is convenient to use with other Spring frameworks, such as: SpringCache


RedisTemplate is a template that uses redis in spring-data-redis.
JedisConnectionFactory is a factory class where spring-data-redis uses redis through jedis.

that is, spring is obtained by using redis through RedisTemplate and by jedis.


Jedis is an official encapsulation framework for Java operation redis-api by Redis.
redistemplate is the spring framework's encapsulation of jedis and lettuce. So that the spring framework system can be more convenient to access the functions of redis.

redistemplate supports jedis and lettuce

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b37e61-2c0b0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b37e61-2c0b0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?