Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- REDIS
- 네임드 뷰
- AWS
- rabbitmq 에러
- 리액트
- quert
- 컴포넌트 주도
- ACCESS_REFUSED
- 자바
- 자료구조
- 리덕스 공식문서
- 애그리거트
- exiting abnormally
- EBS
- 리덕스
- 오라클
- Express
- 커스텀 로그인
- forNmae()
- 공식문서
- react
- .getClass()
- VUE
- redux
- paraller
- 도커빌드
- vue.js
- 오라클 병렬처리
- $emit()
- Java Reflextion API
Archives
- Today
- Total
개발정리
[트러블 슈팅] jpa 양방향 매핑 조회시 stackoverflow 문제 본문
@GetMapping("/{count}")
public ResponseEntity<List<ItemDTO>> getItems(@PathVariable int count) {
Page<Item> pages=itemService.getItems(count);
List<ItemDTO> items=new ArrayList<>();
for(Item item:pages.getContent()){
ItemDTO itemDTO=ItemDTO.builder().id(item.getId()).content(item.getContent()).title(item.getTitle())
.price(item.getPrice()).place(item.getPlace()).build();
itemDTO.setPhotos(new ArrayList<>());
itemDTO.getPhotos().add(item.getPhotos().get(0));
items.add(itemDTO);
System.out.println(itemDTO);
}
return ResponseEntity.ok(items);
}
itemDTO.getPhotos().add(item.getPhotows().get(0));
부분에서 순환참조가 일어나 stackoverflow 에러 발생
'개발 > 중거거래사이트 클론' 카테고리의 다른 글
[트러블 슈팅] Cannot read properties of undefined (reading 'userId') (0) | 2024.02.23 |
---|---|
[트러블 슈팅]-라우터 params undefined 문제 (0) | 2024.02.20 |
[트러블 슈팅] vue.js axios 인터셉터 설정 (0) | 2024.02.16 |
[트러블 슈팅]로그인시 로그아웃으로 변경 (0) | 2024.02.05 |
[BUG] 415 (Unsupported Media) error (0) | 2024.02.03 |