Skip to content

Commit

Permalink
Merge pull request #17 from TeamUStory/feat/recommend
Browse files Browse the repository at this point in the history
fix:RedisConfig 수정
  • Loading branch information
GiJungPark authored Aug 13, 2024
2 parents 85e17ce + 6d78ebc commit eb2fd75
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/main/java/com/elice/ustory/global/config/RedisConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,10 @@ public RedisConnectionFactory redisConnectionFactory() {
return new LettuceConnectionFactory(redisStandaloneConfiguration);
}

@Bean
public RedisConnectionFactory redisConnectionFactoryForRec() {
return new LettuceConnectionFactory();
}

@Bean
public RedisTemplate<String, RecommendRedisDTO> redisTemplate() {
RedisTemplate<String, RecommendRedisDTO> template = new RedisTemplate<>();
template.setConnectionFactory(redisConnectionFactoryForRec());
template.setConnectionFactory(redisConnectionFactory());
template.setKeySerializer(new StringRedisSerializer());
template.setValueSerializer(new GenericJackson2JsonRedisSerializer());
return template;
Expand All @@ -44,7 +39,7 @@ public RedisTemplate<String, RecommendRedisDTO> redisTemplate() {
@Bean
public RedisTemplate<String, Long> longRedisTemplate() {
RedisTemplate<String, Long> template = new RedisTemplate<>();
template.setConnectionFactory(redisConnectionFactoryForRec());
template.setConnectionFactory(redisConnectionFactory());
template.setKeySerializer(new StringRedisSerializer());
template.setValueSerializer(new GenericJackson2JsonRedisSerializer());
return template;
Expand Down

0 comments on commit eb2fd75

Please sign in to comment.