Example usage for org.springframework.data.redis.serializer GenericJackson2JsonRedisSerializer GenericJackson2JsonRedisSerializer

List of usage examples for org.springframework.data.redis.serializer GenericJackson2JsonRedisSerializer GenericJackson2JsonRedisSerializer

Introduction

In this page you can find the example usage for org.springframework.data.redis.serializer GenericJackson2JsonRedisSerializer GenericJackson2JsonRedisSerializer.

Prototype

public GenericJackson2JsonRedisSerializer(ObjectMapper mapper) 

Source Link

Document

Setting a custom-configured ObjectMapper is one way to take further control of the JSON serialization process.

Usage

From source file:sample.config.SessionConfig.java

@Bean
public RedisSerializer<Object> springSessionDefaultRedisSerializer() {
    return new GenericJackson2JsonRedisSerializer(objectMapper());
}