From 9a2e51f76fc24e9881050af5cc05067f9f47c407 Mon Sep 17 00:00:00 2001 From: yanzhi Date: Fri, 17 Apr 2026 18:58:10 +0800 Subject: [PATCH 1/2] Test running --- pom.xml | 50 +++++++++++++++++++---- src/test/resources/application.properties | 6 +++ 2 files changed, 48 insertions(+), 8 deletions(-) create mode 100644 src/test/resources/application.properties diff --git a/pom.xml b/pom.xml index 6dfee89..8c3bb46 100644 --- a/pom.xml +++ b/pom.xml @@ -45,6 +45,12 @@ spring-boot-starter-web + + com.h2database + h2 + test + + org.springframework.boot spring-boot-devtools @@ -68,7 +74,7 @@ io.jsonwebtoken jjwt-jackson - 0.12.0 + 0.11.5 runtime @@ -124,12 +130,40 @@ - - - org.springframework.boot - spring-boot-maven-plugin - - - + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + org.jacoco + jacoco-maven-plugin + 0.8.11 + + + + + + prepare-agent + + + + + + report + test + + report + + + + + + + + diff --git a/src/test/resources/application.properties b/src/test/resources/application.properties new file mode 100644 index 0000000..f79b07c --- /dev/null +++ b/src/test/resources/application.properties @@ -0,0 +1,6 @@ +spring.datasource.url=jdbc:h2:mem:testdb +spring.datasource.driverClassName=org.h2.Driver +spring.datasource.username=sa +spring.datasource.password= + +spring.jpa.hibernate.ddl-auto=create-drop \ No newline at end of file From b0ce0760290fccb9a28671c70eb19c1c69ddbd91 Mon Sep 17 00:00:00 2001 From: yanzhi Date: Fri, 17 Apr 2026 18:58:10 +0800 Subject: [PATCH 2/2] Test running --- pom.xml | 25 ++++++----------------- src/test/resources/application.properties | 6 ++++++ 2 files changed, 12 insertions(+), 19 deletions(-) create mode 100644 src/test/resources/application.properties diff --git a/pom.xml b/pom.xml index 3998097..26795d8 100644 --- a/pom.xml +++ b/pom.xml @@ -45,6 +45,12 @@ spring-boot-starter-web + + com.h2database + h2 + test + + org.springframework.boot spring-boot-devtools @@ -129,25 +135,6 @@ org.springframework.boot spring-boot-maven-plugin - - org.jacoco - jacoco-maven-plugin - 0.8.12 - - - - prepare-agent - - - - report - test - - report - - - - diff --git a/src/test/resources/application.properties b/src/test/resources/application.properties new file mode 100644 index 0000000..f79b07c --- /dev/null +++ b/src/test/resources/application.properties @@ -0,0 +1,6 @@ +spring.datasource.url=jdbc:h2:mem:testdb +spring.datasource.driverClassName=org.h2.Driver +spring.datasource.username=sa +spring.datasource.password= + +spring.jpa.hibernate.ddl-auto=create-drop \ No newline at end of file