Java Code Examples for org.springframework.data.redis.serializer.RedisSerializationContext#fromSerializer()
The following examples show how to use
org.springframework.data.redis.serializer.RedisSerializationContext#fromSerializer() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RedisConfig.java From spring-reactive-sample with GNU General Public License v3.0 | 5 votes |
@Bean public ReactiveRedisTemplate<String, Post> reactiveRedisTemplate(ReactiveRedisConnectionFactory factory) { return new ReactiveRedisTemplate<String, Post>( factory, RedisSerializationContext.fromSerializer(new Jackson2JsonRedisSerializer(Post.class)) ); }
Example 2
Source File: RedisConfig.java From spring-reactive-sample with GNU General Public License v3.0 | 5 votes |
@Bean public ReactiveRedisTemplate<String, Post> reactiveRedisTemplate(ReactiveRedisConnectionFactory factory) { return new ReactiveRedisTemplate<String, Post>( factory, RedisSerializationContext.fromSerializer(new Jackson2JsonRedisSerializer(Post.class)) ); }
Example 3
Source File: RedisConfiguration.java From reactor-workshop with GNU General Public License v3.0 | 4 votes |
@Bean RedisSerializationContext<String, String> serializationContext() { return RedisSerializationContext.fromSerializer(RedisSerializer.string()); }