Quantcast
Channel: Active questions tagged redis+java - Stack Overflow
Viewing all articles
Browse latest Browse all 2204

Save key-value in redis with HSET function

$
0
0

Hi i am have java object , Student with fields id, name, ...
I'am need save this object in key-value format in redis in memory, where key is Student.id and value is Student object. I am need do that with redis HSET function.Now i am do it with HashOperations class:

    HashOperations hashOperations = redisTemplate.opsForHash();    hashOperations.put(student.getId(), student.getId().hashCode(), student);

but in redis i got key like this "\xac\xed\x00\x05t\x00\x06111111"
am i doing right?
What it means, why i dont see only string value 11111 in keys, can someone explain please


Viewing all articles
Browse latest Browse all 2204

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>