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

convert redis subscribe message to model object for post call

$
0
0

I am subscribing to redis topic. I am reading the model message which is in org.springframework.data.redis.connection.Message format. I am able to convert to message to string.

Employee [userName=efgh, name=efgh]

now I want to convert the string to employee entity for rest post call. i tried objectmapper but it is giving an error

Employee emp = objectMapper.readValue(empString, Employee.class);

Please help, how can i do it. converting string to entity or redis message to entity.

restTemplate.postForEntity(uri, Employee, String.class);

Viewing all articles
Browse latest Browse all 2204

Trending Articles



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