6장
REST API의 장점
주소와 메서드만 보고 요청의 내용을 알 수 있음
@Builder는 롬복에서 지원하는 건데 이걸 생성자 위에 입력하면 빌더 패턴 방식으로 객체를 생성할 수 있어 편리함
객체를 유연하고 직관적으로 생성할 수 있는 장점이 있음
@NoArgsConstructor 기본 생성자 추가
@AllArgsConstructor 모든 필드 값을 파라미터로 받는 생성자 추가
140pg까지함
## 안됨?
at me.shinsunyoung.springbootdeveloper.SpringBootDeveloperApplication.main(SpringBootDeveloperApplication.java:9) ~[classes/:na]
Caused by: org.hibernate.AnnotationException: Entity 'me.shinsunyoung.springbootdeveloper.domain.Article' has no identifier (every '@Entity' class must declare or inherit at least one '@Id' or '@EmbeddedId' property)
at org.hibernate.cfg.InheritanceState.determineDefaultAccessType(InheritanceState.java:266) ~[hibernate-core-6.1.6.Final.jar:6.1.6.Final]
'공부 > Spring' 카테고리의 다른 글
스프링 부트 3 백엔드 개발자 되기_7 (0) | 2023.08.07 |
---|---|
스프링 부트 3 백엔드 개발자 되기_6 (0) | 2023.08.04 |
스프링 부트 3 백엔드 개발자 되기_4 (0) | 2023.08.02 |
스프링 부트 3 백엔드 개발자 되기_3 (0) | 2023.08.01 |
스프링 부트 3 백엔드 개발자 되기_2 (0) | 2023.07.31 |