From f1c14fc1729246136fcfedc6a831206354922b17 Mon Sep 17 00:00:00 2001
From: Lim JinKeon <0907john24@gmail.com>
Date: Wed, 6 May 2026 14:19:44 +0900
Subject: [PATCH 1/5] =?UTF-8?q?Refactor:=20application.yml=20=EC=84=A4?=
=?UTF-8?q?=EC=A0=95=20=EC=88=98=EC=A0=95,=20Spring=20Security=20=EC=84=A4?=
=?UTF-8?q?=EC=A0=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../config/QueueSecurityConfig.java | 31 +++++++++++++++++++
src/main/resources/application.yml | 29 +++++++++++++----
2 files changed, 54 insertions(+), 6 deletions(-)
create mode 100644 src/main/java/org/ticketing/queue/infrastructure/config/QueueSecurityConfig.java
diff --git a/src/main/java/org/ticketing/queue/infrastructure/config/QueueSecurityConfig.java b/src/main/java/org/ticketing/queue/infrastructure/config/QueueSecurityConfig.java
new file mode 100644
index 0000000..883c798
--- /dev/null
+++ b/src/main/java/org/ticketing/queue/infrastructure/config/QueueSecurityConfig.java
@@ -0,0 +1,31 @@
+package org.ticketing.queue.infrastructure.config;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.core.annotation.Order;
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer;
+import org.springframework.security.config.http.SessionCreationPolicy;
+import org.springframework.security.web.SecurityFilterChain;
+
+@Configuration
+public class QueueSecurityConfig {
+
+ // MVP 통합 테스트용 임시 SecurityConfig
+ @Bean
+ @Order(1)
+ public SecurityFilterChain queueFilterChain(HttpSecurity http) throws Exception {
+ return http
+ .securityMatcher("/**")
+ .csrf(AbstractHttpConfigurer::disable)
+ .formLogin(AbstractHttpConfigurer::disable)
+ .httpBasic(AbstractHttpConfigurer::disable)
+ .sessionManagement(session ->
+ session.sessionCreationPolicy(SessionCreationPolicy.STATELESS)
+ )
+ .authorizeHttpRequests(auth -> auth
+ .anyRequest().permitAll()
+ )
+ .build();
+ }
+}
\ No newline at end of file
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index 8b4dc03..92c6228 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -3,10 +3,27 @@ spring:
name: queue-service
config:
- import: optional:configserver:${CONFIG_SERVER_URL:http://localhost:10002}
+ import: optional:configserver:http://localhost:10002
- cloud:
- config:
- fail-fast: false # config-server 없어도 로컬 기동 가능
- import-check:
- enabled: false
+ kafka:
+ bootstrap-servers: ${KAFKA_BOOTSTRAP_SERVERS:localhost:19092}
+ consumer:
+ group-id: queue-service
+ auto-offset-reset: latest
+ key-deserializer: org.apache.kafka.common.serialization.StringDeserializer
+ value-deserializer: org.springframework.kafka.support.serializer.ErrorHandlingDeserializer
+ properties:
+ spring.deserializer.value.delegate.class: org.springframework.kafka.support.serializer.JsonDeserializer
+ spring.json.trusted.packages: "org.ticketing.queue.domain.event,java.util,java.lang"
+ spring.json.use.type.headers: false
+ spring.json.value.default.type: org.ticketing.queue.domain.event.MatchApprovedEvent
+
+management:
+ tracing:
+ enabled: false
+ sampling:
+ probability: 0.0
+ zipkin:
+ tracing:
+ export:
+ enabled: false
\ No newline at end of file
From e4fff743a3a6661c5eceb3507623a8748f3f28e1 Mon Sep 17 00:00:00 2001
From: Lim JinKeon <0907john24@gmail.com>
Date: Wed, 6 May 2026 15:05:09 +0900
Subject: [PATCH 2/5] =?UTF-8?q?Refactor:=20application-docker.yml=20?=
=?UTF-8?q?=EC=84=A4=EC=A0=95=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-docker.yml | 32 +++++++++++------------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/src/main/resources/application-docker.yml b/src/main/resources/application-docker.yml
index c9007c0..41e4395 100644
--- a/src/main/resources/application-docker.yml
+++ b/src/main/resources/application-docker.yml
@@ -1,3 +1,12 @@
+server:
+ tomcat:
+ threads:
+ max: 500
+ min-spare: 100
+ accept-count: 1000
+ max-connections: 8192
+ connection-timeout: 5000
+
spring:
config:
activate:
@@ -6,7 +15,7 @@ spring:
data:
redis:
host: ticketing-redis
- port: 6379
+ port: ${REDIS_PORT:6379}
timeout: 5000ms
lettuce:
shutdown-timeout: 100ms
@@ -19,9 +28,6 @@ spring:
hikari:
maximum-pool-size: 30
minimum-idle: 10
- connection-timeout: 3000
- idle-timeout: 600000
- max-lifetime: 1800000
jpa:
hibernate:
@@ -41,6 +47,9 @@ eureka:
defaultZone: ${EUREKA_DEFAULT_ZONE:http://eureka-server:10001/eureka/} # 도커 내부 서비스명
management:
+ metrics:
+ tags:
+ application: ${spring.application.name} # Grafana 필터링 기준
endpoints:
web:
exposure:
@@ -52,15 +61,6 @@ management:
tracing:
endpoint: ${ZIPKIN_URL:http://localhost:9411/api/v2/spans}
-# data:
-# redis:
-# password: ${REDIS_PASSWORD}
-# sentinel:
-# master: mymaster
-# nodes:
-# - redis-sentinel-1:26379
-# - redis-sentinel-2:26379
-# - redis-sentinel-3:26379
-# timeout: 5000ms
-# lettuce:
-# shutdown-timeout: 100ms
+queue:
+ token:
+ secret: ${QUEUE_TOKEN_SECRET}
From d2d7199b4ffd2e5e170e018ffa63ad1c44d6d39a Mon Sep 17 00:00:00 2001
From: Lim JinKeon <0907john24@gmail.com>
Date: Wed, 6 May 2026 21:36:17 +0900
Subject: [PATCH 3/5] =?UTF-8?q?Refactor:=20application-docker.yml=20?=
=?UTF-8?q?=EC=84=A4=EC=A0=95=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-docker.yml | 10 +++----
src/main/resources/logback.xml | 36 ++++++++++++++++++-----
2 files changed, 33 insertions(+), 13 deletions(-)
diff --git a/src/main/resources/application-docker.yml b/src/main/resources/application-docker.yml
index 41e4395..560a1f0 100644
--- a/src/main/resources/application-docker.yml
+++ b/src/main/resources/application-docker.yml
@@ -14,7 +14,7 @@ spring:
data:
redis:
- host: ticketing-redis
+ host: ${REDIS_HOST:ticketing-redis}
port: ${REDIS_PORT:6379}
timeout: 5000ms
lettuce:
@@ -31,7 +31,7 @@ spring:
jpa:
hibernate:
- ddl-auto: ${JPA_DDL_AUTO:update} # 도커는 update (create면 매번 초기화 위험)
+ ddl-auto: ${JPA_DDL_AUTO:update}
properties:
hibernate:
default_schema: ${QUEUE_SCHEMA:queue}
@@ -39,12 +39,12 @@ spring:
create_schemas: true
kafka:
- bootstrap-servers: kafka:9092
+ bootstrap-servers: ${SPRING_KAFKA_BOOTSTRAP_SERVERS}
eureka:
client:
service-url:
- defaultZone: ${EUREKA_DEFAULT_ZONE:http://eureka-server:10001/eureka/} # 도커 내부 서비스명
+ defaultZone: ${EUREKA_DEFAULT_ZONE:http://eureka-server:10001/eureka/}
management:
metrics:
@@ -56,7 +56,7 @@ management:
include: health,info,prometheus
tracing:
sampling:
- probability: 1.0
+ probability: 0.1
zipkin:
tracing:
endpoint: ${ZIPKIN_URL:http://localhost:9411/api/v2/spans}
diff --git a/src/main/resources/logback.xml b/src/main/resources/logback.xml
index 565e304..08f7166 100644
--- a/src/main/resources/logback.xml
+++ b/src/main/resources/logback.xml
@@ -19,25 +19,45 @@
-
+
+
+
+ {"service":"queue-service"}
+
+ timestamp
+ message
+ logger
+ thread
+ level
+
+
+
+
+
logs/queue-service.log
-
logs/queue-service.%d{yyyy-MM-dd}.log
14
-
%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level %thread %logger{36} [traceId=%X{traceId}] - %msg%n
UTF-8
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
From 7e64def2d74e9443ee4ecd4210f0e451eeafb6f2 Mon Sep 17 00:00:00 2001
From: Lim JinKeon <0907john24@gmail.com>
Date: Thu, 7 May 2026 12:47:26 +0900
Subject: [PATCH 4/5] =?UTF-8?q?Refactor:=20Dockerfild,=20.gitignore=20?=
=?UTF-8?q?=EC=88=98=EC=A0=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.gitignore | 6 ++++++
Dockerfile | 24 ++++++++++--------------
2 files changed, 16 insertions(+), 14 deletions(-)
diff --git a/.gitignore b/.gitignore
index 4ff88f9..f7a7c5c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,9 @@
HELP.md
+README.md
+.git
+.gitignore
.gradle
+build
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
@@ -22,6 +26,7 @@ bin/
*.iws
*.iml
*.ipr
+out
out/
!**/src/main/**/out/
!**/src/test/**/out/
@@ -35,4 +40,5 @@ out/
/.nb-gradle/
### VS Code ###
+.vscode
.vscode/
diff --git a/Dockerfile b/Dockerfile
index d55aedb..458d952 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,27 +1,23 @@
-FROM eclipse-temurin:17-jdk AS build
+FROM gradle:8.12-jdk17 AS build
+
WORKDIR /app
ARG GPR_USER
ARG GPR_TOKEN
-COPY gradlew .
-COPY gradle gradle
-COPY build.gradle .
-COPY settings.gradle .
-
-RUN chmod +x gradlew
+COPY build.gradle settings.gradle ./
+COPY gradle ./gradle
-RUN ./gradlew dependencies --no-daemon \
- -PGPR_USER=${GPR_USER} \
- -PGPR_TOKEN=${GPR_TOKEN} || true
+RUN GPR_USER=${GPR_USER} GPR_TOKEN=${GPR_TOKEN} gradle dependencies --no-daemon || true
-COPY src src
+COPY src ./src
-RUN ./gradlew bootJar -x test --no-daemon \
- -PGPR_USER=${GPR_USER} \
- -PGPR_TOKEN=${GPR_TOKEN}
+RUN GPR_USER=${GPR_USER} GPR_TOKEN=${GPR_TOKEN} gradle bootJar --no-daemon -x test
FROM eclipse-temurin:17-jre
+
WORKDIR /app
+
COPY --from=build /app/build/libs/*.jar app.jar
+
ENTRYPOINT ["java", "-jar", "app.jar"]
\ No newline at end of file
From 386cec8bbc01bc44d8f15ecc140c27fae1cc3c74 Mon Sep 17 00:00:00 2001
From: Lim JinKeon <0907john24@gmail.com>
Date: Fri, 8 May 2026 10:32:48 +0900
Subject: [PATCH 5/5] =?UTF-8?q?Refactor:=20application-docker.yml=20?=
=?UTF-8?q?=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-docker.yml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/main/resources/application-docker.yml b/src/main/resources/application-docker.yml
index 560a1f0..e5a38ab 100644
--- a/src/main/resources/application-docker.yml
+++ b/src/main/resources/application-docker.yml
@@ -21,7 +21,7 @@ spring:
shutdown-timeout: 100ms
datasource:
- url: jdbc:postgresql://${DB_HOST:ticketing-postgres}:${DB_PORT:15432}/${DB_NAME:ticketing}?currentSchema=${QUEUE_SCHEMA:queue}
+ url: jdbc:postgresql://${DB_HOST:ticketing-postgres}:${DB_PORT:15432}/${DB_NAME:ticketing}?currentSchema=${DB_SCHEMA:queue}
username: ${DB_USERNAME}
password: ${DB_PASSWORD}
driver-class-name: org.postgresql.Driver
@@ -34,7 +34,7 @@ spring:
ddl-auto: ${JPA_DDL_AUTO:update}
properties:
hibernate:
- default_schema: ${QUEUE_SCHEMA:queue}
+ default_schema: ${DB_SCHEMA:queue}
hbm2ddl:
create_schemas: true
@@ -49,7 +49,7 @@ eureka:
management:
metrics:
tags:
- application: ${spring.application.name} # Grafana 필터링 기준
+ application: ${spring.application.name}
endpoints:
web:
exposure: