Service2 RelationService RelationService Relation에 대한 business Logic을 처리하는 RelationService를 생성하고 구현한다. 1. RelationService ■ RelationService [RelationService] @Service @Transactional(readOnly = true) @RequiredArgsConstructor public class RelationService { private final AccountRepository accountRepository; private final RelationRepository relationRepository; . . . } □ requestFriend fromAccountId -> toAccountId 방향의 "친구 요청".. 2022. 6. 3. Account Service Account Service Controller로 들어온 요청을 처리하는데 사용되는 Sevice 계층을 구현한다. 1. AccountService ■ AccountService [AccountService] @Service @Transactional(readOnly = true) //[1] @RequiredArgsConstructor public class AccountService { private final AccountRepository accountRepository; private final FileProcessor fileProcessor; private final BCryptPasswordEncoder bCryptPasswordEncoder; @Value("${file.profile}") /.. 2022. 5. 11. 이전 1 다음