Skip to content

Commit

Permalink
#194 [feat] redis template primary 등록
Browse files Browse the repository at this point in the history
  • Loading branch information
KWY0218 committed Jan 26, 2024
1 parent 79934b4 commit d61cc1f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/com/moddy/server/config/redis/RedisConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;
import org.springframework.data.redis.core.RedisTemplate;
Expand All @@ -22,6 +23,7 @@ public RedisConnectionFactory redisConnectionFactory() {
}

@Bean
@Primary
public RedisTemplate<String, String> getRedisTemplate() {
RedisTemplate<String, String> redisTemplate = new RedisTemplate<>();
redisTemplate.setConnectionFactory(redisConnectionFactory());
Expand Down

0 comments on commit d61cc1f

Please sign in to comment.