From dc35f6069e178cfdcc5ff263d31a1c02a2777762 Mon Sep 17 00:00:00 2001 From: chanrhan Date: Sun, 4 Jan 2026 20:57:05 +0900 Subject: [PATCH 1/8] =?UTF-8?q?feat:=20ERROR=20=EB=A1=9C=EA=B7=B8=EB=A5=BC?= =?UTF-8?q?=20=ED=8C=8C=EC=9D=BC=EB=A1=9C=20=EC=A0=80=EC=9E=A5=ED=95=98?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/application.yml | 3 +++ .../db/procedure/init_user_streak.sql | 2 ++ src/main/resources/logback-spring.xml | 22 ++++++++++++++----- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 32de391a..1cdf169e 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -23,6 +23,9 @@ spring: multipart: max-file-size: 150MB max-request-size: 150MB + output: + ansi: + enabled: always logging: pattern: diff --git a/src/main/resources/db/procedure/init_user_streak.sql b/src/main/resources/db/procedure/init_user_streak.sql index d239b5f1..c08c9006 100644 --- a/src/main/resources/db/procedure/init_user_streak.sql +++ b/src/main/resources/db/procedure/init_user_streak.sql @@ -1,3 +1,5 @@ +# 해당 쿼리를 실행하려는 날짜 기준, 이전 주까지의 스트릭을 갱신 +# 이번 주의 주간 결과는 포함 안함 set @start_date := (select date_sub(curdate(), interval weekday(curdate()) day)); update users u diff --git a/src/main/resources/logback-spring.xml b/src/main/resources/logback-spring.xml index 1b1defb6..4e8e5bdf 100644 --- a/src/main/resources/logback-spring.xml +++ b/src/main/resources/logback-spring.xml @@ -1,18 +1,24 @@ + + + + + - + - ${CONSOLE_PATTERN} + ${CONSOLE_LOG_PATTERN} - - ${LOG_DIR}/app.log @@ -20,11 +26,15 @@ ${LOG_DIR}/app.%d{yyyy-MM-dd}.log 30 + + ERROR + ACCEPT + DENY + ${CONSOLE_PATTERN} - --> From cd169b671e309c2a5b26ceb94b97cc8ffd9dbe97 Mon Sep 17 00:00:00 2001 From: chanrhan Date: Sat, 10 Jan 2026 22:44:16 +0900 Subject: [PATCH 2/8] =?UTF-8?q?test:=20=ED=85=8C=EC=8A=A4=ED=8A=B8=20?= =?UTF-8?q?=EC=BD=94=EB=93=9C=20=EB=B0=8F=20=EC=98=88=EC=99=B8=20=EC=B2=98?= =?UTF-8?q?=EB=A6=AC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 2 +- build.gradle | 12 +- gradle/libs.versions.toml | 3 + .../src/js/components/UserProgress.jsx | 10 +- .../domain/problem/model/BaekjoonProblem.java | 2 + .../domain/problem/model/SolvedProblem.java | 2 + .../SolvedProblemQueryRepository.java | 2 +- .../baektracker/domain/user/model/User.java | 3 + .../weekly_result/model/WeeklyResult.java | 12 +- .../service/WeeklyResultService.java | 8 +- .../BaektrackerApplicationTests.java | 2 +- .../job/WeeklyResultServiceTest.java | 246 ++++++++++++++++++ 12 files changed, 288 insertions(+), 16 deletions(-) rename src/test/java/com/baektracker/{hanco => }/BaektrackerApplicationTests.java (86%) create mode 100644 src/test/java/com/baektracker/domain/weekly_result/job/WeeklyResultServiceTest.java diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ee79c335..027089f6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,4 +39,4 @@ jobs: run: chmod +x gradlew - name: Build (includes React build) - run: ./gradlew clean bootJar --no-daemon + run: ./gradlew clean build --no-daemon diff --git a/build.gradle b/build.gradle index ab95fdfd..02d8e48e 100644 --- a/build.gradle +++ b/build.gradle @@ -23,6 +23,12 @@ dependencies { implementation libs.org.mybatis.spring.boot.mybatis.spring.boot.starter runtimeOnly libs.org.springframework.boot.spring.boot.devtools + // Test + testImplementation libs.org.junit.jupiter.junit.jupiter + testImplementation libs.org.mockito.mockito.junit.jupiter + testImplementation libs.org.assertj.assertj.core + + // JPA implementation libs.org.springframework.boot.spring.boot.starter.data.jpa @@ -77,6 +83,10 @@ tasks.withType(Javadoc) { options.encoding = 'UTF-8' } +tasks.test { + useJUnitPlatform() +} + def frontendDir = "$projectDir/src/main/frontend" def querydslDir = layout.buildDirectory.dir("generated/querydsl").get().asFile def reactBuildDir = layout.buildDirectory.dir("frontend").get().asFile @@ -138,4 +148,4 @@ tasks.register('copyReactBuildFiles', Copy) { dependsOn "buildReact" from "$frontendDir/build" into reactBuildDir -} \ No newline at end of file +} diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 1853abaa..5a6b9b7f 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -42,3 +42,6 @@ org-springframework-boot-spring-boot-starter-tomcat = { module = "org.springfram org-springframework-boot-spring-boot-starter-web = { module = "org.springframework.boot:spring-boot-starter-web", version.ref = "org-springframework-boot-spring-boot-starter-web" } org-springframework-security-spring-security-test = { module = "org.springframework.security:spring-security-test", version.ref = "org-springframework-security-spring-security-test" } org-webjars-jquery = { module = "org.webjars:jquery", version.ref = "org-webjars-jquery" } +org-junit-jupiter-junit-jupiter = { module = "org.junit.jupiter:junit-jupiter" } +org-mockito-mockito-junit-jupiter = { module = "org.mockito:mockito-junit-jupiter" } +org-assertj-assertj-core = { module = "org.assertj:assertj-core" } diff --git a/src/main/frontend/src/js/components/UserProgress.jsx b/src/main/frontend/src/js/components/UserProgress.jsx index abfa326f..e3135aea 100644 --- a/src/main/frontend/src/js/components/UserProgress.jsx +++ b/src/main/frontend/src/js/components/UserProgress.jsx @@ -223,11 +223,11 @@ export function UserProgress({fromDate, toDate}) { {user.nickname} {isWeekPass ? 이번주 패스 : ''} - {user.weekPassCount > 0 && ( - - 🛡️{user.weekPassCount} - - )} + {/*{user.weekPassCount > 0 && (*/} + {/* */} + {/* 🛡️{user.weekPassCount}*/} + {/* */} + {/*)}*/}