Notice
Recent Posts
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |
Tags
- Eclipse
- 자바
- SESSION
- Spring
- 면접
- java
- 마이바티스
- 깃허브
- 셋업
- jsp 내부객체
- EL태그
- jstl
- 오라클
- 알고리즘
- jquery
- 제이쿼리
- 이클립스
- 버튼
- Oracle
- 설치
- 필터체인
- 깃허브 간단요약
- 설정
- 스프링
- springboot
- jsp
- 폼태그
- 자바스크립트
- MySQL
- html
Archives
- Today
- Total
728x90
목록스트림 리스트 안에 특정 dto 요소 조회 (1)
은은하게 코드 뿌시기
스트림 리스트 안에 특정 dto 요소 조회
List anotherBoxList = BoxRepository.findByAnotherProductBox(); for (Box anotherBox : anotherBoxList) { BoxListResponseDto BoxListResponseDto = BoxListResponseDto.builder() .id(anotherBox.getBoxNum()) .build(); // 중복제거 boolean isIdExists = BoxListResponseDtos .stream() .anyMatch(Box -> Box.getId().equals(anotherBox.getBoxNum())); if (!isIdExists){ BoxListResponseDtos.add(BoxListResponseDto); } }
자바/자바 기본
2024. 2. 22. 11:21
728x90