February 2018
Intermediate to advanced
356 pages
9h 10m
English
The main class from Spring Data Redis is the ReactiveRedisTemplate, then we need to configure and provide an instance for the Spring container.
We need to provide an instance and configure the correct serializer for the desired ReactiveRedisTemplate. Serializers is the way Spring Data Redis uses to serialize and deserialize objects from raw bytes stored in Redis in the Key and Value fields.
We will use only the StringRedisSerializer because our Key and Value are simple strings and the Spring Data Redis has this serializer ready for us.
Let's produce our ReactiveRedisTemplate. The implementation should look like the following:
package springfive.twittertracked.infra.redis import org.springframework.context.annotation. ...