View Full Version : How to use JacksonJsonRedisSerializer??
Aug 24th, 2011, 04:36 AM
I want to push JSONObject in the list <String,JSONObject>
I'm using spring data redis 1.0.0.M4
How can I use JacksonJsonRedisSerializer to do that or can provide your way.
Aug 25th, 2011, 02:38 AM
You'll have to expand on that since I don't understand what your problem is.
Note there's a sample that you can use to get you started.
Aug 29th, 2011, 11:11 AM
Here is my config:
<bean id="redisTemplate" class="org.springframework.data.redis.core.StringRedisTem plate"
<property name="ValueSerializer" ref="redisJsonSerializer"/>
<bean id="redisJsonSerializer" class="org.springframework.data.redis.serializer.JacksonJ sonRedisSerializer">
<constructor-arg type="java.lang.Class" value="your.class.here"/>
note that I only used the JacksonJsonRedisSerializer for the value and not the key, for me the key is still a plain ol string.
Aug 31st, 2011, 03:22 AM
Sounds like a Jackson specific problem. There are plenty of results on google such as this one: http://www.cowtowncoder.com/blog/archives/2011/03/entry_447.html
Powered by vBulletin® Version 4.2.1 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.