io.microsphere.spring.test.redis.RedisTestConfiguration Maven / Gradle / Ivy
package io.microsphere.spring.test.redis;
import io.microsphere.spring.test.redis.embedded.EnableEmbeddedRedisServer;
import org.springframework.context.annotation.Bean;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.connection.RedisStandaloneConfiguration;
import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.data.redis.serializer.StringRedisSerializer;
import redis.embedded.RedisServer;
/**
* Redis test configuration class configures the component list:
*
* - {@link RedisTemplate RedisTemplate<Object,Object>}
* - {@link StringRedisTemplate}
* - {@link RedisServer}
*
*
* @author Mercy
* @since 1.0.0
*/
@EnableEmbeddedRedisServer
class RedisTestConfiguration {
@Bean
public RedisTemplate