From dc930a8b2f626186468f0dfeb309f11bec3532ae Mon Sep 17 00:00:00 2001 From: ekgns33 Date: Wed, 2 Apr 2025 16:31:51 +0900 Subject: [PATCH 1/3] :hammer: chore : update p6spy config --- build.gradle | 2 +- src/main/resources/application.yml | 21 +++++++++++-------- ...ot.autoconfigure.AutoConfiguration.imports | 1 + src/test/resources/application.yml | 7 ++++++- src/test/resources/spy.properties | 1 + 5 files changed, 21 insertions(+), 11 deletions(-) create mode 100644 src/test/resources/META-INF.spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports create mode 100644 src/test/resources/spy.properties diff --git a/build.gradle b/build.gradle index 413e4804..858760d6 100644 --- a/build.gradle +++ b/build.gradle @@ -23,7 +23,7 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-security' implementation 'org.springframework.boot:spring-boot-starter-validation' implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.8.5' - implementation 'com.github.gavlyukovskiy:p6spy-spring-boot-starter:1.6.2' + implementation 'com.github.gavlyukovskiy:p6spy-spring-boot-starter:1.9.0' implementation 'me.paulschwarz:spring-dotenv:4.0.0' implementation 'org.springframework.security:spring-security-oauth2-client' diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 5513c22e..4f7163bf 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -47,14 +47,18 @@ jwt: expiration: ${JWT_EXPIRATION:3600000} refresh: expiration: ${JWT_REFRESH_EXPIRATION:86400000} - -logging: - level: - org: - hibernate: - type: - descriptor: - sql: debug +# +#logging: +# level: +# org: +# hibernate: +# type: +# descriptor: +# sql: debug +decorator: + datasource: + p6spy: + enable-logging: true --- spring: @@ -68,7 +72,6 @@ spring: properties: hibernate: dialect: org.hibernate.dialect.MySQLDialect - show-sql: true jwt: expiration: 300000 refresh: diff --git a/src/test/resources/META-INF.spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/src/test/resources/META-INF.spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 00000000..95564833 --- /dev/null +++ b/src/test/resources/META-INF.spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1 @@ +com.github.gavlyukovskiy.boot.jdbc.decorator.DataSourceDecoratorAutoConfiguration \ No newline at end of file diff --git a/src/test/resources/application.yml b/src/test/resources/application.yml index f1985a73..d325250e 100644 --- a/src/test/resources/application.yml +++ b/src/test/resources/application.yml @@ -62,4 +62,9 @@ logging: hibernate: type: descriptor: - sql: debug \ No newline at end of file + sql: trace + +decorator: + datasource: + p6spy: + enable-logging: true diff --git a/src/test/resources/spy.properties b/src/test/resources/spy.properties new file mode 100644 index 00000000..33585472 --- /dev/null +++ b/src/test/resources/spy.properties @@ -0,0 +1 @@ +appender=com.p6spy.engine.spy.appender.Slf4JLogger \ No newline at end of file From 581d5afe62e7ea8bf106d310516d3884d6433c6c Mon Sep 17 00:00:00 2001 From: ekgns33 Date: Wed, 2 Apr 2025 16:36:14 +0900 Subject: [PATCH 2/3] :hammer: chore : update application. --- src/main/resources/application.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 4f7163bf..2679b12e 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -72,6 +72,8 @@ spring: properties: hibernate: dialect: org.hibernate.dialect.MySQLDialect + show-sql: true + jwt: expiration: 300000 refresh: From ac7df7016e4212bf0c2bfb58759e618546b083f6 Mon Sep 17 00:00:00 2001 From: ekgns33 Date: Wed, 2 Apr 2025 16:57:26 +0900 Subject: [PATCH 3/3] :hammer: chore : update application.yml --- src/main/resources/application.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 2679b12e..1e63a569 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -47,14 +47,14 @@ jwt: expiration: ${JWT_EXPIRATION:3600000} refresh: expiration: ${JWT_REFRESH_EXPIRATION:86400000} -# -#logging: -# level: -# org: -# hibernate: -# type: -# descriptor: -# sql: debug + +logging: + level: + org: + hibernate: + type: + descriptor: + sql: debug decorator: datasource: p6spy: