Announcement Announcement Module
Collapse
No announcement yet.
How to use JacksonJsonRedisSerializer?? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to use JacksonJsonRedisSerializer??

    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.

  • #2
    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.

    Comment


    • #3
      Here is my config:
      <bean id="redisTemplate" class="org.springframework.data.redis.core.StringR edisTemplate"
      p:connection-factory-ref="redisConnectionFactory">
      <property name="ValueSerializer" ref="redisJsonSerializer"/>
      </bean>
      <bean id="redisJsonSerializer" class="org.springframework.data.redis.serializer.J acksonJsonRedisSerializer">
      <constructor-arg type="java.lang.Class" value="your.class.here"/>
      </bean>

      note that I only used the JacksonJsonRedisSerializer for the value and not the key, for me the key is still a plain ol string.

      Comment


      • #4
        Sounds like a Jackson specific problem. There are plenty of results on google such as this one: http://www.cowtowncoder.com/blog/arc...entry_447.html

        Comment

        Working...
        X