9

I am using Redis as data store for my spring web application and using Spring Data-Redis as my client to interact with Redis.

I am using HashMap to store one my objects having multiple fields. I am able to put all the fields into Redis at once using DefaultRedisMap.putAll() method, but I am not able to get the whole object at once instead using BoundHashOperations to get each field using get() method.

I am wondering is there any way I can do that just like HGETALL operation supported in Redis?

4

2 に答える 2

6

DefaultRedisMap.entrySet() または BoundHashOperations.entries() は、すべてのキーと値を一度に提供する必要があります。

于 2013-06-28T16:27:50.387 に答える