1:N 관계에서
247
작성한 질문수 26
특정 게시글을 조회하고 싶을 때 작성된 댓글들도 같이 보고 싶은데 InvalidDefinitionException: Direct self-reference leading to cycle 관련하여 에러가 뜹니다.
@JsonIgnore로 해결하기보다 ResponseDto로 만들어서 entity -> ResponseDto로 변환해서 응답하고 싶습니다.
그래서 ResponseDto를 만들어서 entity -> ResponseDto로 변환했는데 저런 에러가 뜹니다. 어떻게 해결해야하는지 도와주세요
그리고 @Builder를 사용해 빌터패턴을 적용할 때 인자가 많아질 경우 아래처럼 인자가 저렇게 길어지는 것이 맞는 건가요??
@Builder
public ArticleResponseDto(Long id, String title, String content, LocalDateTime createdDate, LocalDateTime updatedDate, List<Hashtag> hashtags, List<Comment> comments) {
this.id = id;
this.title = title;
this.content = content;
this.createdDate = createdDate;
this.updatedDate = updatedDate;
this.hashtags = hashtags;
this.comments = comments;
}
답변 0
서비스에서와 컨트롤러의 @Vaild 적용 차이에 대해서
0
49
2
copilot-instruction.md
0
40
2
"폴더를 찾을 수 없습니다." 라는 응답만 계속 나옵니다.
0
47
1
EmailSender 관련 문의
0
55
1
조회 메서드 네이밍 질문
0
70
1
Properties 설정이 추가되었는데
0
40
1
isInterrupted 질문 있다.
0
38
1
fieldInjectionTest() 질문
0
58
1
AutoAppConfig의 존재이유
0
53
1
RunIdIncrementer batch 5랑 6랑
1
66
2
AppConfig와 스프링 빈 질문
0
57
1
강의 자료를 받아볼 순 없겠나
1
84
2
핵사고날 아키텍처 기반으로 멀티 모듈 설계 시 질문드립니다..
0
77
2
자료 다운로드 문제
0
83
2
인넬리제이 무료버전
0
71
2
DataSourceUtils.releaseConnection 할때요 SQLException e 사용하는 이유등
0
91
2
수업자료 오타
0
81
2
Post, PostEntity에서 User, UserEntity 의존
0
65
1
이클립스 스프링 환경설정 오류
0
95
2
내부 객체 직접 접근에 관하여.
0
108
2
CertificationServiceTest
0
61
1
FlushModeType.COMMIT (12:45) 예시코드 질문
0
69
1
클로드코드 명령어 - 대화&세션관리부분 강의자료 빈폴더
0
80
1
Spock given and가 검증을 하는지
0
66
1





