Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -24,7 +25,7 @@ public class UserSyncEvent {

private Long userId;

@Enumerated
@Enumerated(EnumType.STRING)
private UserSyncEventType eventType;

private String newValue;
Expand Down
72 changes: 36 additions & 36 deletions src/main/resources/application-test.yml
Original file line number Diff line number Diff line change
@@ -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"
Comment on lines +1 to +36
Copy link

Copilot AI Jul 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider removing the commented-out configuration entirely if it is no longer required to reduce file clutter and improve maintainability.

Suggested change
#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"
# (Removed commented-out configuration to reduce file clutter and improve maintainability)

Copilot uses AI. Check for mistakes.
9 changes: 9 additions & 0 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,12 @@ discord:

firebase:
service-key: ${FIREBASE_SERVICE_KEY_JSON}

management:
endpoints:
web:
exposure:
include: prometheus
endpoint:
prometheus:
enabled: true
Loading