From 1d8f25f975caffafa09ee7b8c5ea8243d0335791 Mon Sep 17 00:00:00 2001 From: choisungwook Date: Fri, 8 Oct 2021 19:35:07 +0900 Subject: [PATCH] =?UTF-8?q?[FEATURE]=20E4-S3=20=ED=9A=8C=EC=9B=90=EA=B0=80?= =?UTF-8?q?=EC=9E=85=20API=20-=20=EB=A1=9C=EA=B7=B8=EC=9D=B8=20=EC=A0=84?= =?UTF-8?q?=20=EB=A1=9C=EA=B9=85=20#25?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/infp/ciat/user/entity/Account.java | 6 ++---- .../java/com/infp/ciat/user/service/AccountService.java | 4 +++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/backend/src/main/java/com/infp/ciat/user/entity/Account.java b/backend/src/main/java/com/infp/ciat/user/entity/Account.java index 7388c41..76d6f8c 100644 --- a/backend/src/main/java/com/infp/ciat/user/entity/Account.java +++ b/backend/src/main/java/com/infp/ciat/user/entity/Account.java @@ -1,10 +1,7 @@ package com.infp.ciat.user.entity; import com.infp.ciat.common.BaseTimeEntity; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Getter; -import lombok.NoArgsConstructor; +import lombok.*; import javax.persistence.*; @@ -15,6 +12,7 @@ @NoArgsConstructor @Getter @Entity +@ToString public class Account extends BaseTimeEntity { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) diff --git a/backend/src/main/java/com/infp/ciat/user/service/AccountService.java b/backend/src/main/java/com/infp/ciat/user/service/AccountService.java index 8996d58..609ec90 100644 --- a/backend/src/main/java/com/infp/ciat/user/service/AccountService.java +++ b/backend/src/main/java/com/infp/ciat/user/service/AccountService.java @@ -6,6 +6,7 @@ import com.infp.ciat.user.entity.Role; import com.infp.ciat.user.repository.AccountRepository; import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; import org.springframework.security.core.userdetails.UserDetails; import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.security.core.userdetails.UsernameNotFoundException; @@ -16,6 +17,7 @@ @Service @RequiredArgsConstructor @Transactional(readOnly = true) +@Slf4j public class AccountService implements UserDetailsService { private final AccountRepository accountRepository; private final PasswordEncoder passwordEncoder; @@ -42,7 +44,7 @@ public Long SignUp(SignupRequestDTO requestdto){ public UserDetails loadUserByUsername(String email) throws UsernameNotFoundException { Account find_user = accountRepository.findByEmail(email) .orElseThrow(() -> new UsernameNotFoundException("사용자가 없습니다")); - + log.debug(String.format("%s 계정 로그인 시도", email)); return AccountContext.FromAccountToAccountContext(find_user); } }