[파편 조각 - Spring Web] Service<spring>/기초 Spring Basic2023. 9. 26. 15:48
Table of Contents
Spring WEB
DS -> Controller -> Service -> JPARepository
ex) 유저
클래스에 @Service Annotation 달기
@Service
public class UserService {
}
@RequiredArgsConstructor을 안달아주면 Repository를 DI하려고 할 때,
`Variable 'userJPARepository' might not have been initialized`
이런 알림창이 겁나 떠대니 요 Annotation도 달아줘야 한다.
'<spring> > 기초 Spring Basic' 카테고리의 다른 글
[파편 조각 - Spring Web] Controller (0) | 2023.09.26 |
---|---|
[파편 조각] Spring 기초 편 (0) | 2023.08.31 |
@Rizingblare :: 마법공학 개발자의 트래블로그
포스팅이 좋았다면 "좋아요❤️" 또는 "구독👍🏻" 해주세요!