Skip to content

Commit

Permalink
fix: registerMember Transactional 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
yeonjy committed Jun 18, 2024
1 parent 1dae21c commit a45bc62
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.transaction.annotation.Transactional;

import java.util.UUID;

Expand All @@ -37,7 +38,8 @@ private Member findOrElseRegisterMember(OAuth2UserInfo userInfo, SocialType soci
.orElseGet(() -> registerMember(socialType, userInfo));
}

private Member registerMember(SocialType socialType, OAuth2UserInfo userInfo) {
@Transactional
public Member registerMember(SocialType socialType, OAuth2UserInfo userInfo) {
Member member = Member.builder()
.socialType(socialType)
.oauthId(userInfo.getId())
Expand Down

0 comments on commit a45bc62

Please sign in to comment.