diff --git a/pangu-system/pom.xml b/pangu-system/pom.xml index 93c7411..76d040c 100644 --- a/pangu-system/pom.xml +++ b/pangu-system/pom.xml @@ -37,24 +37,11 @@ spring-boot-starter-test test - + - com.h2database - h2 + com.mysql + mysql-connector-j test - - - - - org.apache.maven.plugins - maven-surefire-plugin - - - true - - - - diff --git a/pangu-system/src/test/resources/application.yml b/pangu-system/src/test/resources/application.yml index bd9a732..7f1c8b2 100644 --- a/pangu-system/src/test/resources/application.yml +++ b/pangu-system/src/test/resources/application.yml @@ -1,10 +1,10 @@ -# 测试环境配置,供 pangu-system 单模块测试使用 +# 测试环境配置,使用与 pangu-admin 相同的远程 MySQL spring: datasource: - driver-class-name: org.h2.Driver - url: jdbc:h2:mem:testdb;MODE=MySQL;DB_CLOSE_DELAY=-1;INIT=CREATE SCHEMA IF NOT EXISTS PUBLIC - username: sa - password: + driver-class-name: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://8.148.25.55:3306/pguser-db?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 + username: root + password: aly2024A mybatis-plus: mapper-locations: classpath*:mapper/**/*.xml @@ -13,6 +13,7 @@ mybatis-plus: map-underscore-to-camel-case: true pagehelper: - helper-dialect: h2 + helper-dialect: mysql reasonable: true support-methods-arguments: true + params: count=countSql