diff --git a/cider-api/build.gradle b/cider-api/build.gradle index ff41e2f..1101848 100644 --- a/cider-api/build.gradle +++ b/cider-api/build.gradle @@ -58,6 +58,13 @@ dependencies { annotationProcessor "com.querydsl:querydsl-apt:${dependencyManagement.importedProperties['querydsl.version']}:jakarta" annotationProcessor "jakarta.annotation:jakarta.annotation-api" annotationProcessor "jakarta.persistence:jakarta.persistence-api" + + configurations.all { + resolutionStrategy { + force 'org.hibernate.bytecode:hibernate-bytecode:6.1.7.Final' + force 'net.bytebuddy:byte-buddy-dep:1.10.9' + } + } } jar{ diff --git a/cider-api/src/main/java/com/cmc/domains/certify/dto/response/SimpleCertifyResponseDto.java b/cider-api/src/main/java/com/cmc/domains/certify/dto/response/SimpleCertifyResponseDto.java index 301ef50..76a3f99 100644 --- a/cider-api/src/main/java/com/cmc/domains/certify/dto/response/SimpleCertifyResponseDto.java +++ b/cider-api/src/main/java/com/cmc/domains/certify/dto/response/SimpleCertifyResponseDto.java @@ -46,10 +46,15 @@ public class SimpleCertifyResponseDto { public static SimpleCertifyResponseDto from(Certify certify) { + String url = ""; + if(certify.getCertifyImageList().size() != 0){ + url = certify.getCertifyImageList().get(0).getImageUrl(); + } + return new SimpleCertifyResponseDtoBuilder() .simpleMemberResponseDto(SimpleMemberResponseDto.from(certify.getParticipate().getMember())) .certifyId(certify.getCertifyId()) - .certifyImageUrl(certify.getCertifyImageList().get(0).getImageUrl()) + .certifyImageUrl(url) .createdDate(certify.getCreatedDate()) .certifyName(certify.getCertifyName()) .certifyContent(certify.getCertifyContent()) @@ -60,10 +65,15 @@ public static SimpleCertifyResponseDto from(Certify certify) { public static SimpleCertifyResponseDto from(Certify certify, Boolean isLike) { + String url = ""; + if(certify.getCertifyImageList().size() != 0){ + url = certify.getCertifyImageList().get(0).getImageUrl(); + } + return new SimpleCertifyResponseDtoBuilder() .simpleMemberResponseDto(SimpleMemberResponseDto.from(certify.getParticipate().getMember())) .certifyId(certify.getCertifyId()) - .certifyImageUrl(certify.getCertifyImageList().get(0).getImageUrl()) + .certifyImageUrl(url) .createdDate(certify.getCreatedDate()) .certifyName(certify.getCertifyName()) .certifyContent(certify.getCertifyContent()) diff --git a/cider-api/src/main/java/com/cmc/domains/challenge/controller/ChallengeController.java b/cider-api/src/main/java/com/cmc/domains/challenge/controller/ChallengeController.java index 753dcc0..a84ddb0 100644 --- a/cider-api/src/main/java/com/cmc/domains/challenge/controller/ChallengeController.java +++ b/cider-api/src/main/java/com/cmc/domains/challenge/controller/ChallengeController.java @@ -256,9 +256,13 @@ public ResponseEntity getChallengeDetailFeed(Htt Challenge challenge = challengeService.getChallenge(challengeId); List certifies = certifyService.getChallengeCertifyList(challenge, filter); - List certifyImageUrlList = certifies.stream().map(certify -> { - return certify.getCertifyImageList().get(0).getImageUrl(); - }).toList(); + List certifyImageUrlList = new ArrayList<>(); + + for(Certify certify : certifies){ + if(certify.getCertifyImageList().size() != 0){ + certifyImageUrlList.add(certify.getCertifyImageList().get(0).getImageUrl()); + } + } List certifyResponseDtos = new ArrayList<>(); if (tokenString == null || tokenString.isEmpty()) { // 로그인 x diff --git a/cider-api/src/main/java/com/cmc/domains/challenge/dto/response/detail/ChallengeDetailResponseDto.java b/cider-api/src/main/java/com/cmc/domains/challenge/dto/response/detail/ChallengeDetailResponseDto.java index 2f1fb2c..626a824 100644 --- a/cider-api/src/main/java/com/cmc/domains/challenge/dto/response/detail/ChallengeDetailResponseDto.java +++ b/cider-api/src/main/java/com/cmc/domains/challenge/dto/response/detail/ChallengeDetailResponseDto.java @@ -6,7 +6,7 @@ import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; -import org.modelmapper.internal.bytebuddy.build.Plugin; + @Data @Builder