인터페이스 5일차 (Service, Autowired, JPA, ORM)
Service MVC 디자인 패턴의 Model의 일부 실제 비즈니스 로직을 담당하는 부분 각종 연산을 담당 Controller가 받은 Request를 Repository에서 필요한 데이터를 가져와 연산 후 Response에 실을 데이터를 반환 Spring Boot Service 작성 @Service 해당 클래스를 Spring Bean 으로 생성 해주는 어노테이션 @Component로 사용되긴 하지만 해당 클래스가 Service를 담당한다는 것을 직접적으로 보여주기 위해 Service라는 이름을 사용 @Service public class AuthService { public ResponseDto login(AuthPostDto dto){ LoginDto result = new LoginDto("JWT",..
2023.01.09