Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import org.springframework.security.core.Authentication;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;
import EatPic.spring.global.aws.s3.*;
Expand All @@ -40,7 +41,7 @@
import static EatPic.spring.global.common.code.status.ErrorStatus.*;

@Service
@Transactional
@Transactional(readOnly = true)
@RequiredArgsConstructor
public class UserServiceImpl implements UserService{

Expand Down Expand Up @@ -96,6 +97,7 @@ public SignupResponseDTO signup(SignupRequestDTO request) {

// 로그인
@Override
@Transactional(readOnly = false)
public LoginResponseDTO loginUser(LoginRequestDTO request){
User user = userRepository.findByEmail(request.getEmail())
.orElseThrow(()-> new ExceptionHandler(ErrorStatus.MEMBER_NOT_FOUND));
Expand Down Expand Up @@ -247,6 +249,7 @@ public boolean isNicknameDuplicate(String nickname) {
}

@Override
@Transactional(propagation = Propagation.REQUIRES_NEW, readOnly = false)
public User getLoginUser(HttpServletRequest request) {
Authentication authentication = jwtTokenProvider.extractAuthentication(request);
String email = authentication.getName();
Expand Down
Loading