From f75fef36e6e595931aa1b572a81f6cde1269754c Mon Sep 17 00:00:00 2001 From: H <99153215+hyeon0208@users.noreply.github.com> Date: Thu, 26 Sep 2024 23:26:02 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20OSIV=20false=20=EC=84=A4=EC=A0=95?= =?UTF-8?q?=EC=9C=BC=EB=A1=9C=20=EC=9D=B8=ED=95=9C=20=EC=8A=A4=EC=BC=80?= =?UTF-8?q?=EC=A4=84=EB=A7=81=20=EB=A9=94=EC=84=9C=EB=93=9C=20=ED=8A=B8?= =?UTF-8?q?=EB=9E=9C=EC=9E=AD=EC=85=98=20=EC=84=A0=EC=96=B8=20(#617)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/build.gradle | 76 +++++++++++++++++++ .../service/NotificationService.java | 6 +- 2 files changed, 81 insertions(+), 1 deletion(-) create mode 100644 backend/build.gradle diff --git a/backend/build.gradle b/backend/build.gradle new file mode 100644 index 000000000..d6fa2f7b2 --- /dev/null +++ b/backend/build.gradle @@ -0,0 +1,76 @@ +plugins { + id 'java' + id 'jacoco' //테스트 커버리지 검증 라이브러리 추가 + id 'org.springframework.boot' version '3.3.1' + id 'io.spring.dependency-management' version '1.1.5' +} + +group = 'com.ody' +version = '0.0.1-SNAPSHOT' + +java { + toolchain { + languageVersion = JavaLanguageVersion.of(17) + } +} + +jacoco { + toolVersion = '0.8.8' +} + +jacocoTestReport { + jacocoTestReport { + reports { + xml.required.set(true) + csv.required.set(false) + html.required.set(true) + } + } +} + +configurations { + compileOnly { + extendsFrom annotationProcessor + } +} + +repositories { + mavenCentral() +} + +dependencies { + implementation 'com.google.firebase:firebase-admin:9.2.0' + implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.5.0' + implementation 'com.github.ulisesbocchio:jasypt-spring-boot-starter:3.0.5' + implementation 'org.springframework.boot:spring-boot-starter' + implementation 'org.springframework.boot:spring-boot-starter-web' + implementation 'org.springframework.boot:spring-boot-starter-data-jpa' + implementation 'org.springframework.boot:spring-boot-starter-validation' + implementation "io.jsonwebtoken:jjwt:0.9.1" + implementation 'javax.xml.bind:jaxb-api:2.3.1' + implementation 'org.springframework.boot:spring-boot-starter-actuator' + + runtimeOnly 'com.mysql:mysql-connector-j:8.4.0' + runtimeOnly 'com.h2database:h2' + + testImplementation 'org.springframework.boot:spring-boot-starter-test' + testImplementation 'io.rest-assured:rest-assured:5.3.1' + + testRuntimeOnly 'org.junit.platform:junit-platform-launcher' + testRuntimeOnly 'com.h2database:h2' + + annotationProcessor 'org.projectlombok:lombok' + compileOnly 'org.projectlombok:lombok' + + implementation 'org.flywaydb:flyway-mysql' + implementation 'org.flywaydb:flyway-core' +} + +tasks.named('test') { + useJUnitPlatform() + finalizedBy jacocoTestReport +} + +configurations.all { + exclude group: 'commons-logging', module: 'commons-logging' +} diff --git a/backend/src/main/java/com/ody/notification/service/NotificationService.java b/backend/src/main/java/com/ody/notification/service/NotificationService.java index 8c8d9bbda..6abbaf40d 100644 --- a/backend/src/main/java/com/ody/notification/service/NotificationService.java +++ b/backend/src/main/java/com/ody/notification/service/NotificationService.java @@ -80,6 +80,7 @@ public void scheduleNotification(FcmGroupSendRequest fcmGroupSendRequest) { ); } + @Transactional @EventListener(ApplicationReadyEvent.class) public void schedulePendingNotification() { List notifications = notificationRepository.findAllByTypeAndStatus( @@ -92,7 +93,10 @@ public void schedulePendingNotification() { @DisabledDeletedFilter public NotiLogFindResponses findAllMeetingLogs(Long meetingId) { - List notifications = notificationRepository.findAllMeetingLogsBeforeThanEqual(meetingId, LocalDateTime.now()); + List notifications = notificationRepository.findAllMeetingLogsBeforeThanEqual( + meetingId, + LocalDateTime.now() + ); return NotiLogFindResponses.from(notifications); }