Skip to content

Commit

Permalink
MappingException 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
ckkim817 committed Jun 2, 2024
1 parent 746ab61 commit f7b1a3b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import org.springframework.data.redis.core.RedisHash;
import org.springframework.data.redis.core.index.Indexed;

@RedisHash(value = "", timeToLive = 60 * 60 * 24 * 1000L * 14)
@AllArgsConstructor
@NoArgsConstructor
@Getter
@Builder
public class Token {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package org.sopt.springPractice.auth.redis.service;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.sopt.springPractice.auth.redis.domain.Token;
import org.sopt.springPractice.auth.redis.repository.RedisTokenRepository;
import org.sopt.springPractice.auth.redis.service.dto.AccessTokenDTO;
Expand All @@ -14,17 +13,13 @@

@Service
@RequiredArgsConstructor
@Slf4j
public class TokenService {

private final RedisTokenRepository redisTokenRepository;
private final JwtTokenProvider jwtTokenProvider;

@Transactional
public AccessTokenDTO reissueAccessToken(Long userId) {

log.warn("{}", userId);

Token token = redisTokenRepository.findById(userId).orElseThrow(
() -> new UnauthorizedException(ErrorMessage.REFRESH_TOKEN_NOT_FOUND)
);
Expand Down

0 comments on commit f7b1a3b

Please sign in to comment.