JAVA-1645: Use ReactiveStringRedisTemplate
This commit is contained in:
parent
0865321f82
commit
749b832ef8
|
@ -31,11 +31,6 @@ public class RedisConfig {
|
|||
return new ReactiveRedisTemplate<>(factory, context);
|
||||
}
|
||||
|
||||
@Bean
|
||||
public ReactiveRedisTemplate<String, String> reactiveRedisTemplateString(ReactiveRedisConnectionFactory connectionFactory) {
|
||||
return new ReactiveRedisTemplate<>(connectionFactory, RedisSerializationContext.string());
|
||||
}
|
||||
|
||||
@Bean
|
||||
public ReactiveKeyCommands keyCommands(final ReactiveRedisConnectionFactory reactiveRedisConnectionFactory) {
|
||||
return reactiveRedisConnectionFactory.getReactiveConnection()
|
||||
|
|
|
@ -2,9 +2,6 @@ package com.baeldung.spring.data.reactive.redis.template;
|
|||
|
||||
|
||||
import com.baeldung.spring.data.reactive.redis.SpringRedisReactiveApplication;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.Before;
|
||||
import org.junit.BeforeClass;
|
||||
|
@ -13,7 +10,7 @@ import org.junit.runner.RunWith;
|
|||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.data.redis.core.ReactiveListOperations;
|
||||
import org.springframework.data.redis.core.ReactiveRedisTemplate;
|
||||
import org.springframework.data.redis.core.ReactiveStringRedisTemplate;
|
||||
import org.springframework.test.annotation.DirtiesContext;
|
||||
import org.springframework.test.annotation.DirtiesContext.ClassMode;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
@ -21,6 +18,8 @@ import reactor.core.publisher.Mono;
|
|||
import reactor.test.StepVerifier;
|
||||
import redis.embedded.RedisServerBuilder;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = SpringRedisReactiveApplication.class)
|
||||
@DirtiesContext(classMode = ClassMode.BEFORE_CLASS)
|
||||
|
@ -30,7 +29,7 @@ public class RedisTemplateListOpsIntegrationTest {
|
|||
private static redis.embedded.RedisServer redisServer;
|
||||
|
||||
@Autowired
|
||||
private ReactiveRedisTemplate<String, String> redisTemplate;
|
||||
private ReactiveStringRedisTemplate redisTemplate;
|
||||
|
||||
private ReactiveListOperations<String, String> reactiveListOps;
|
||||
|
||||
|
|
Loading…
Reference in New Issue