From 1b48081d5bddd9cbdc7587d8c6965a89fcddc44a Mon Sep 17 00:00:00 2001 From: lanyuanxiaoyao Date: Wed, 7 Jan 2026 16:28:06 +0800 Subject: [PATCH] =?UTF-8?q?build(deps):=20=E7=BB=9F=E4=B8=80=E7=AE=A1?= =?UTF-8?q?=E7=90=86=20datasource-decorator=20=E4=BE=9D=E8=B5=96=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E5=B9=B6=E4=BC=98=E5=8C=96=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在父 pom.xml 中统一管理 datasource-decorator.version 为 2.0.0 - 添加 xbatis 依赖管理,移除子模块中的重复配置 - 为 JPA 模块添加 p6spy 依赖,配置 SQL 日志格式 --- pom.xml | 21 +++++++++++++++++++ spring-boot-service-template-jpa/pom.xml | 5 +++++ .../src/test/resources/application.yml | 10 ++++++++- spring-boot-service-template-xbatis/pom.xml | 14 +------------ 4 files changed, 36 insertions(+), 14 deletions(-) diff --git a/pom.xml b/pom.xml index 06ae51c..f5eea49 100644 --- a/pom.xml +++ b/pom.xml @@ -27,6 +27,7 @@ 7.1 1.6.3 1.5.0 + 2.0.0 @@ -89,11 +90,31 @@ compile + + com.github.gavlyukovskiy + p6spy-spring-boot-starter + ${datasource-decorator.version} + + + com.github.gavlyukovskiy + datasource-proxy-spring-boot-starter + ${datasource-decorator.version} + + org.jspecify jspecify 1.0.0 + + + + cn.xbatis + xbatis-spring-boot-parent + 1.9.6-spring-boot4 + pom + import + diff --git a/spring-boot-service-template-jpa/pom.xml b/spring-boot-service-template-jpa/pom.xml index 891ac5b..4a435cd 100644 --- a/spring-boot-service-template-jpa/pom.xml +++ b/spring-boot-service-template-jpa/pom.xml @@ -46,6 +46,11 @@ compile + + com.github.gavlyukovskiy + p6spy-spring-boot-starter + + org.jspecify jspecify diff --git a/spring-boot-service-template-jpa/src/test/resources/application.yml b/spring-boot-service-template-jpa/src/test/resources/application.yml index 41dfaaa..b10a9fb 100644 --- a/spring-boot-service-template-jpa/src/test/resources/application.yml +++ b/spring-boot-service-template-jpa/src/test/resources/application.yml @@ -9,7 +9,15 @@ spring: password: test driver-class-name: org.h2.Driver jpa: - show-sql: true generate-ddl: true fenix: print-banner: false +decorator: + datasource: + p6spy: + multiline: false + exclude-categories: + - commit + - result + - resultset + log-format: "%(category)|%(executionTime)|%(sqlSingleLine)" diff --git a/spring-boot-service-template-xbatis/pom.xml b/spring-boot-service-template-xbatis/pom.xml index 2cb748f..8d6bd72 100644 --- a/spring-boot-service-template-xbatis/pom.xml +++ b/spring-boot-service-template-xbatis/pom.xml @@ -26,10 +26,10 @@ cn.xbatis xbatis-spring-boot-starter + com.github.gavlyukovskiy p6spy-spring-boot-starter - 2.0.0 @@ -50,18 +50,6 @@ - - - - cn.xbatis - xbatis-spring-boot-parent - 1.9.6-spring-boot4 - pom - import - - - -