search

Home  >  Q&A  >  body text

java - Using RedisTemplate to manipulate data

The difference between using RedisTemplate's execute() method and opsFor*() to operate data

世界只因有你世界只因有你2774 days ago686

reply all(1)I'll reply

  • 世界只因有你

    世界只因有你2017-05-16 13:21:25

    Answer by yourself:

    1. execute() requires a RedisConnection object, and operating Redis through RedisConnection is called Low-Level Abstractions

    2. opsFor and the like are called High-Level Abstractions, which are designed to provide more friendly template classes. The bottom layer still calls execute(), which requires a RedisConnection object. So I think opsFor is a further encapsulation of execute().
      If you have a better understanding, please feel free to communicate.

    Reference documentation

    reply
    0
  • Cancelreply