왜 두 개를 구분 짓는지 이유를 알고 싶었다.
Repository는 DB에 접근하는 코드를 모아두었다.
Service는 DB에 직접적으로 접근하는 것은 Repository에 맡겨서 비즈니스 로직에 집중할 수 있다.
비즈니스 로직은 데이터베이스와 유저 인터페이스간의 정보 교환을 다루는 알고리즘
나는 서비스가 리포지토리를 이용해서 어떤 기능(비즈니스 로직)을 만드는 것이라고 이해했다.
참고 👇
https://www.inflearn.com/questions/77417
Repository vs Service 의 역할의 차이점 - 인프런 | 질문 & 답변
안녕하세요. 선생님 강의 정말 잘 보고있습니다. 궁금한점이 있어서요 Repository 패키지와 Service 패키지가 보통 구분되어있는데 정확하게 쓰임새의 차이점을 모르겠습니다. 그냥 스프링에서 Servic
www.inflearn.com
비즈니스 로직(Business Logic)이란?
안녕하세요. Mommoo 입니다. 프로그래밍에 관한 일을 하다보면 많이 듣는 용어중 하나 인, 비즈니스 로직(Business Logic)에 대하여 포스팅 합니다. 영역 구분하기 홈페이지 회원가입으로 예를 들어봅
mommoo.tistory.com
https://www.investopedia.com/terms/b/businesslogic.asp
Business Logic
Business logic is the custom rules or algorithms that handle the exchange of information between a database and user interface.
www.investopedia.com
'Framework > Spring Boot' 카테고리의 다른 글
[Error] Error creating bean with name 'thymeleafViewResolver' defined in class path resource (0) | 2021.10.24 |
---|---|
[Error] spelevaluationexception (0) | 2021.10.13 |
[Error] 수정 후 조회수 초기화 (0) | 2021.08.07 |
[Error] Can not set int field Bulletin.Board.domain.posts.Post.view to null value (0) | 2021.07.24 |
[Error] org.springframework.beans.factory.UnsatisfiedDependencyException (0) | 2021.07.22 |