whatever-mentoring / Dopamine_Backend

ChallenG9 서비스 백엔드, Spring
2 stars 2 forks source link

챌린지 랜덤 매핑 구현 #21

Closed KarmaPol closed 1 year ago

KarmaPol commented 1 year ago
KarmaPol commented 1 year ago

여러 방법 있었지만 쿼리 dsl + mysql 조합에서 랜덤하게 가져오는 방법 중 이게 가장 간단했습니다 https://deergum.github.io/web/web-querydsl-mysql-random/

KarmaPol commented 1 year ago

challengeMembers.stream().forEach(ChallengeMember::deleteChallengeMember); 실행시 java.util.ConcurrentModificationException 오류 발생 => for문에 index 지정해줘서 해결 https://codechacha.com/ko/java-concurrentmodificationexception/