From 1508c2fb447d848ae880f4e929a142c35be8d024 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=80=E1=85=AF=E1=86=AB=E1=84=8C=E1=85=A1=E1=86=BC?= =?UTF-8?q?=E1=84=89=E1=85=AE=E1=86=AB?= Date: Tue, 1 Jul 2025 11:26:36 +0900 Subject: [PATCH 1/5] =?UTF-8?q?build(deps):=20=ED=94=84=EB=A1=9C=EB=A9=94?= =?UTF-8?q?=ED=85=8C=EC=9A=B0=EC=8A=A4=20=EB=AA=A8=EB=8B=88=ED=84=B0?= =?UTF-8?q?=EB=A7=81=20=EC=9D=98=EC=A1=B4=EC=84=B1=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 5279bf5..b830317 100644 --- a/build.gradle +++ b/build.gradle @@ -27,7 +27,6 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-data-jpa' implementation 'org.springframework.boot:spring-boot-starter-security' implementation 'org.springframework.boot:spring-boot-starter-aop' - implementation 'org.springframework.boot:spring-boot-starter-actuator' implementation 'org.springframework.boot:spring-boot-starter-batch' implementation 'org.springframework.boot:spring-boot-starter-webflux' @@ -59,6 +58,10 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testRuntimeOnly 'org.junit.platform:junit-platform-launcher' testImplementation 'com.h2database:h2' + + // Monitoring + implementation 'org.springframework.boot:spring-boot-starter-actuator' + implementation 'io.micrometer:micrometer-registry-prometheus' } // QueryDSL Settings From cafde2b3423b2be31a35a3e3ed9a6d87ba12399b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=80=E1=85=AF=E1=86=AB=E1=84=8C=E1=85=A1=E1=86=BC?= =?UTF-8?q?=E1=84=89=E1=85=AE=E1=86=AB?= Date: Tue, 1 Jul 2025 11:26:46 +0900 Subject: [PATCH 2/5] =?UTF-8?q?feat(monitoring):=20=ED=94=84=EB=A1=9C?= =?UTF-8?q?=EB=A9=94=ED=85=8C=EC=9A=B0=EC=8A=A4=20Actuator=20=EC=97=94?= =?UTF-8?q?=EB=93=9C=ED=8F=AC=EC=9D=B8=ED=8A=B8=20=ED=99=9C=EC=84=B1?= =?UTF-8?q?=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/application.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index ec01946..bb1cc26 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -53,3 +53,12 @@ discord: firebase: service-key: ${FIREBASE_SERVICE_KEY_JSON} + +management: + endpoints: + web: + exposure: + include: prometheus + endpoint: + prometheus: + enabled: true From 0abe7f13a75accfe1f722b84c76d098163ae6825 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=80=E1=85=AF=E1=86=AB=E1=84=8C=E1=85=A1=E1=86=BC?= =?UTF-8?q?=E1=84=89=E1=85=AE=E1=86=AB?= Date: Tue, 1 Jul 2025 11:26:58 +0900 Subject: [PATCH 3/5] =?UTF-8?q?feat(security):=20Actuator=20=EC=97=94?= =?UTF-8?q?=EB=93=9C=ED=8F=AC=EC=9D=B8=ED=8A=B8=20=EC=A0=91=EA=B7=BC=20?= =?UTF-8?q?=ED=97=88=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../terning/terningserver/common/config/SecurityConfig.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/terning/terningserver/common/config/SecurityConfig.java b/src/main/java/org/terning/terningserver/common/config/SecurityConfig.java index f984b4f..518bdb2 100644 --- a/src/main/java/org/terning/terningserver/common/config/SecurityConfig.java +++ b/src/main/java/org/terning/terningserver/common/config/SecurityConfig.java @@ -32,7 +32,8 @@ public class SecurityConfig { "/api/v1/users/**", "/api/v1/push-status", "/api/v1/external/scraps/unsynced", - "/api/v1/external/scraps/sync/result" + "/api/v1/external/scraps/sync/result", + "/actuator/**", }; @Bean From 9478bd9b40caa0ae0ae195e42c67baba14c7445b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=80=E1=85=AF=E1=86=AB=E1=84=8C=E1=85=A1=E1=86=BC?= =?UTF-8?q?=E1=84=89=E1=85=AE=E1=86=AB?= Date: Tue, 1 Jul 2025 11:27:43 +0900 Subject: [PATCH 4/5] =?UTF-8?q?refactor:=20UserSyncEventType=20=EC=A0=80?= =?UTF-8?q?=EC=9E=A5=20=EB=B0=A9=EC=8B=9D=EC=9D=84=20STRING=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../external/pushNotification/user/domain/UserSyncEvent.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/terning/terningserver/external/pushNotification/user/domain/UserSyncEvent.java b/src/main/java/org/terning/terningserver/external/pushNotification/user/domain/UserSyncEvent.java index 5583aee..ca6c090 100644 --- a/src/main/java/org/terning/terningserver/external/pushNotification/user/domain/UserSyncEvent.java +++ b/src/main/java/org/terning/terningserver/external/pushNotification/user/domain/UserSyncEvent.java @@ -1,6 +1,7 @@ package org.terning.terningserver.external.pushNotification.user.domain; import jakarta.persistence.Entity; +import jakarta.persistence.EnumType; import jakarta.persistence.Enumerated; import jakarta.persistence.GeneratedValue; import jakarta.persistence.GenerationType; @@ -24,7 +25,7 @@ public class UserSyncEvent { private Long userId; - @Enumerated + @Enumerated(EnumType.STRING) private UserSyncEventType eventType; private String newValue; From 42cd923fe1706bc3ead854bd908ec5fce69375f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=80=E1=85=AF=E1=86=AB=E1=84=8C=E1=85=A1=E1=86=BC?= =?UTF-8?q?=E1=84=89=E1=85=AE=E1=86=AB?= Date: Tue, 1 Jul 2025 11:27:48 +0900 Subject: [PATCH 5/5] =?UTF-8?q?chore:=20=EB=B6=88=ED=95=84=EC=9A=94?= =?UTF-8?q?=ED=95=9C=20=EC=A3=BC=EC=84=9D=20=EC=B2=98=EB=A6=AC=EB=90=9C=20?= =?UTF-8?q?=EC=84=A4=EC=A0=95=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/application-test.yml | 72 ++++++++++++------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/src/main/resources/application-test.yml b/src/main/resources/application-test.yml index 8d18327..b86d998 100644 --- a/src/main/resources/application-test.yml +++ b/src/main/resources/application-test.yml @@ -1,36 +1,36 @@ -spring: - datasource: - url: jdbc:h2:mem:testdb;MODE=PostgreSQL;DATABASE_TO_UPPER=FALSE - username: sa - password: -# driver-class-name: org.h2.Driver - - jpa: - hibernate: - ddl-auto: create-drop - properties: - hibernate: - dialect: org.hibernate.dialect.H2Dialect - format_sql: true - show-sql: true - - h2: - console: - enabled: true - path: /h2-console - - batch: - job: - enabled: false - -jwt: - secret-key: "this-is-a-temporary-secret-key-for-local-tests-1234567890" - access-token-expired: 3600000 - refresh-token-expired: 86400000 - -operation: - base-url: http://localhost:9999 - -discord: - webhook: - url: "https://discord.com/api/webhooks/test/test" +#spring: +# datasource: +# url: jdbc:h2:mem:testdb;MODE=PostgreSQL;DATABASE_TO_UPPER=FALSE +# username: sa +# password: +## driver-class-name: org.h2.Driver +# +# jpa: +# hibernate: +# ddl-auto: create-drop +# properties: +# hibernate: +# dialect: org.hibernate.dialect.H2Dialect +# format_sql: true +# show-sql: true +# +# h2: +# console: +# enabled: true +# path: /h2-console +# +# batch: +# job: +# enabled: false +# +#jwt: +# secret-key: "this-is-a-temporary-secret-key-for-local-tests-1234567890" +# access-token-expired: 3600000 +# refresh-token-expired: 86400000 +# +#operation: +# base-url: http://localhost:9999 +# +#discord: +# webhook: +# url: "https://discord.com/api/webhooks/test/test"