Skip to content

Commit

Permalink
fix: ROLE 조회가 되도록 Transactional(readonly) 어노테이션 작성
Browse files Browse the repository at this point in the history
  • Loading branch information
jang-namu committed Apr 8, 2024
1 parent 9bb18fc commit 8f88547
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import org.springframework.security.authentication.BadCredentialsException;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@RequiredArgsConstructor
Expand All @@ -22,6 +23,7 @@ public class AuthServiceImpl {
private final PasswordEncoder passwordEncoder;
private final RefreshTokenRepository refreshTokenRepository;

@Transactional(readOnly = true)
public TokenResponse login(SignInRequest signInRequest) {

User user = userRepository.findByEmail(signInRequest.getEmail()).orElseThrow(() ->
Expand Down

0 comments on commit 8f88547

Please sign in to comment.