soolsul / soolsul-server

λ„˜λΈ” λ””μžμ΄λ„ˆ-ν”„λ‘ νŠΈ-λ°±μ—”λ“œ 첼린지 3λ“±/21νŒ€
7 stars 1 forks source link

[Suggest] Facade λ¦¬νŒ©ν† λ§ #70

Open pbg0205 opened 1 year ago

pbg0205 commented 1 year ago

πŸ™‹πŸ»β€β™‚οΈ μ œμ•ˆ 사항

Facade 계측을 ν•˜λ‚˜ μΆ”κ°€ν•˜λŠ” 방법에 λŒ€ν•΄ κ³ λ―Ό

νŒ¨μ„œλ“œ νŒ¨ν„΄?

νŒ¨μ„œλ“œ νŒ¨ν„΄μ˜ μž₯점

ν˜„μž¬ Service λ ˆμ΄μ–΄κ°„ μ°Έμ‘°λ₯Ό ν•˜κ³  μžˆλŠ” μœ„μΉ˜

PostCommandService

@Service
@Transactional
@RequiredArgsConstructor
public class PostCommandService {

    private final PostRepository postRepository;
    private final BarQueryService barQueryService;

}

PostQueryService

@Service
@RequiredArgsConstructor
@Transactional(readOnly = true)
public class PostQueryService {

    private final PostRepository postRepository;
    private final BarQueryRepository barQueryRepository;
    private final CustomUserDetailsService userDetailsService;
    private final LocationRangeService locationRangeService;

}

πŸ“– μ°Έκ³  사항

κ³΅μœ ν•  λ‚΄μš©, 레퍼런슀, μΆ”κ°€λ‘œ λ°œμƒν•  κ²ƒμœΌλ‘œ μ˜ˆμƒλ˜λŠ” 이슈, μŠ€ν¬λ¦°μƒ· 등을 λ„£μ–΄ μ£Όμ„Έμš”.

zbqmgldjfh commented 1 year ago

μš°μ„  쒋은 κΈ€ κ°μ‚¬νž™λ‹ˆλ‹€!

λ‹€μŒκ³Ό 같이 μ›λž˜λŠ” Query, Command μ„œλΉ„μŠ€ 뢀뢄듀을 νΌμ‚¬λ“œλ‘œ λ³€κ²½λ˜λ„λ‘ κ΅¬ν˜„ν•˜μ˜€μŠ΅λ‹ˆλ‹€!

@Service
@RequiredArgsConstructor
public class PostServiceGateway implements CommandService<PostCreateRequest>, QueryService {

    private final PostCommandService postCommandService; // νΌμ‚¬λ“œλ‘œ
    private final PostQueryService postQueryService; // νΌμ‚¬λ“œλ‘œ