Skip to content

Commit

Permalink
fix : redis 관련 에러 해결 #46
Browse files Browse the repository at this point in the history
  • Loading branch information
dhun0103 committed Jan 6, 2025
1 parent 1b1e2f7 commit dba2d8a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/main/java/itstime/reflog/config/RedisConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,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 @@ -24,6 +25,7 @@ public RedisConnectionFactory redisConnectionFactory() {
}

@Bean
@Primary
public RedisTemplate<String, String> redisTemplate() {
RedisTemplate<String, String> redisTemplate = new RedisTemplate<>();
redisTemplate.setConnectionFactory(redisConnectionFactory());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import itstime.reflog.oauth.token.domain.RefreshToken;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.ValueOperations;
Expand All @@ -16,7 +17,7 @@ public class RefreshTokenRepository{

@Value("${jwt.refresh-token.expiration-time}")
private long REFRESH_TOKEN_EXPIRATION_TIME;

@Qualifier("redisTemplate")
private final RedisTemplate redisTemplate;
private static final String REFRESH_TOKEN_PREFIX = "refresh:";

Expand Down

0 comments on commit dba2d8a

Please sign in to comment.