I'm creating a new Redis key (and content) with the following code:
private static final String KEY_ESTADOS = "estados";
private HashOperations<String, String, Object> hashOperations;
public void add(final Estado estado) {
hashOperations.put(KEY_ESTADOS, estado.getSigla(), estado);
}
Instead of create a key "estados" on Redis, it's creating a key name ""\xac\xed\x00\x05t\x00\aestados"
The key content is also with strange characters:
Anybody knows how to fix this?
The Estados class implements Serializable but I would like save it's content in pure json so I could change HashOperations to instead of . What do you recommend to serialize to json and deserialize it back to object?
Thanks