0

I have an application using spring-data-keyvalue. As I understand by default it uses HashMap without persistence. The documentation says I could use redis for that, with jedis (among others). I want to keep my application independent of the type of key-value store. However when searching documentation on ho to set it up, all of them uses spring-data-redis. Am I confused, and spring-data-redis is also the persistence engine for spring-data-keyvalue, and I just have to use something like @EnableMapRepositories(keyValueTemplateRef = "RedisTemplate") ?

I looked at the source of jedis, but found no class implementing Map or having template in its name. Should I really implement Map by hand to use jedis directly, or am I overlooking something?

2
  • You should use an appropriate library for each data storage solution. In the end, you will use some concrete storage to use with your application. From my experience, spring-data-redis is sufficient to make everything work. Commented Jun 30 at 13:19
  • I used yhe built-in persistenceless solution, and worked great. It is an osgi and classloading related problem. Commented Aug 8 at 4:44

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.