Refactor dynamic-datasource-spring-boot-starter
unit test and Contributor Guides to fix CI (#564)
This commit is contained in:
parent
289e860b0f
commit
8e8e098208
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -45,7 +45,7 @@ jobs:
|
||||
- name: Build Spring Boot Starter 3 test with Maven
|
||||
run: |
|
||||
./mvnw -T1C -B -PgenerateMetadata -DskipNativeTests clean test
|
||||
# ./mvnw -am -pl dynamic-datasource-spring-boot3-starter -PnativeTestInSpringBoot clean test
|
||||
# ./mvnw -am -pl dynamic-datasource-spring-boot3-starter -PnativeTestInSpringBoot T1C -B clean test
|
||||
test-maximum-jdk-ci:
|
||||
name: Test CI - JDK ${{ matrix.java-version }} on ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
@ -1,17 +1,67 @@
|
||||
# FORK
|
||||
# 1. FORK
|
||||
|
||||
Git Mirror 位于 https://github.com/baomidou/dynamic-datasource 。
|
||||
|
||||
# RUN TEST
|
||||
# 2. RUN TEST
|
||||
|
||||
此项目在 OpenJDK 17 下完成构建,输出产物指向 OpenJDK 7。
|
||||
此项目在 OpenJDK 17 下完成构建,输出产物指向 OpenJDK 8。
|
||||
|
||||
当项目导入 IntelliJ IDEA 或 VSCode 时,IDE 对项目的语言级别应当设置为 7。
|
||||
当项目导入 IntelliJ IDEA 或 VSCode 时,IDE 对项目的语言级别应当设置为 8。
|
||||
对于单独的 `com.baomidou:dynamic-datasource-spring-boot3-starter` 子模块,IDE 的语言级别应当设置为 17。
|
||||
|
||||
提交 PR 前,应在 OpenJDK 17 下执行 `./mvnw -T1C -B clean test` 以验证更改是否未破坏单元测试。若有需要请补充或更改单元测试。
|
||||
|
||||
# PR
|
||||
假设贡献者处于新的 Ubuntu 22.04.3 LTS 实例下,其可通过如下 bash 命令来执行单元测试。
|
||||
|
||||
```bash
|
||||
sudo apt install unzip zip curl sed -y
|
||||
curl -s "https://get.sdkman.io" | bash
|
||||
source "$HOME/.sdkman/bin/sdkman-init.sh"
|
||||
sdk install java 17.0.8-ms
|
||||
sdk use java 17.0.8-ms
|
||||
|
||||
git clone git@github.com:baomidou/dynamic-datasource.git
|
||||
cd ./dynamic-datasource/
|
||||
./mvnw -T1C -B clean test
|
||||
```
|
||||
|
||||
## 2.1. Execute NativeTest under GraalVM Native Image
|
||||
|
||||
项目的输出产物对在 GraalVM Native Image 下的可用性的验证,是通过 GraalVM Native Build Tools 的 Maven Plugin 子项目来完成的。
|
||||
通过在 JVM 下运行单元测试,为单元测试打上 unique Id,此后构建为 GraalVM Native Image 进行 nativeTest 来测试在 GraalVM Native Image
|
||||
下的单元测试覆盖率。
|
||||
|
||||
项目定义了 `generateMetadata` 的 Maven Profile 用于在普通 JVM 下携带 GraalVM Tracing Agent 执行单元测试,并在特定目录下生成或合并
|
||||
已有的 GraalVM Reachability Metadata 文件。
|
||||
|
||||
项目定义了 `nativeTestInSpringBoot` 的 Maven Profile 用于为 `dynamic-datasource-spring-boot3-starter` 模块执行 nativeTest。
|
||||
|
||||
假设贡献者处于新的 Ubuntu 22.04.3 LTS 实例下,其可通过如下 bash 命令为 `dynamic-datasource-spring-boot3-starter` 子模块执行 nativeTest。
|
||||
|
||||
```bash
|
||||
sudo apt install unzip zip curl sed -y
|
||||
curl -s "https://get.sdkman.io" | bash
|
||||
source "$HOME/.sdkman/bin/sdkman-init.sh"
|
||||
sdk install java 17.0.8-graalce
|
||||
sdk use java 17.0.8-graalce
|
||||
sudo apt-get install build-essential libz-dev zlib1g-dev -y
|
||||
|
||||
git clone git@github.com:baomidou/dynamic-datasource.git
|
||||
cd ./dynamic-datasource/
|
||||
./mvnw -T1C -B -PgenerateMetadata -DskipNativeTests clean test
|
||||
./mvnw -am -pl dynamic-datasource-spring-boot3-starter -PnativeTestInSpringBoot -T1C -B clean test
|
||||
```
|
||||
|
||||
贡献者在提交 PR 后,位于 Github Actions 的 CI 将进行此验证。相关 CI 的失败行为是现阶段是可接受的。
|
||||
|
||||
请不要为 SPEL 功能编写可能的 nativeTest,参考 https://github.com/spring-projects/spring-framework/issues/29548 。如有需要,
|
||||
请使用 `org.graalvm.nativeimage.imagecode` 的 System Property 屏蔽相关测试在 GraalVM Native Image 下运行。
|
||||
|
||||
当贡献者发现缺少与 `dynamic-datasource` 无关的第三方库的 GraalVM Reachability Metadata 时,应当在
|
||||
https://github.com/oracle/graalvm-reachability-metadata 打开新的 issue, 并提交包含依赖的第三方库缺失的 GraalVM Reachability
|
||||
Metadata 的 PR。
|
||||
|
||||
# 3. PR
|
||||
|
||||
PR 应提交到位于 Github 的 Git Mirror,即 https://github.com/baomidou/dynamic-datasource 。
|
||||
位于 Github Actions 的 CI 将在 OpenJDK 8 和 OpenJDK 17 下对 PR 对应分支执行对应的单元测试。
|
||||
|
@ -45,4 +45,4 @@
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
</project>
|
||||
|
@ -19,14 +19,12 @@ import com.baomidou.dynamic.datasource.DynamicRoutingDataSource;
|
||||
import com.baomidou.dynamic.datasource.creator.DataSourceProperty;
|
||||
import com.baomidou.dynamic.datasource.creator.DefaultDataSourceCreator;
|
||||
import com.baomidou.dynamic.datasource.creator.hikaricp.HikariCpConfig;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.jdbc.datasource.SimpleDriverDataSource;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
@ -34,7 +32,6 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.springframework.boot.test.context.SpringBootTest.WebEnvironment.RANDOM_PORT;
|
||||
|
||||
@SpringBootTest(classes = AddRemoveDatasourceApplication.class, webEnvironment = RANDOM_PORT)
|
||||
@RunWith(SpringRunner.class)
|
||||
public class AddRemoveDatasourceTest {
|
||||
|
||||
@Autowired
|
||||
@ -44,7 +41,7 @@ public class AddRemoveDatasourceTest {
|
||||
DefaultDataSourceCreator dataSourceCreator;
|
||||
|
||||
@Test
|
||||
public void testAddAndRemoveDataSource() {
|
||||
void testAddAndRemoveDataSource() {
|
||||
HikariCpConfig hikariCpConfig = new HikariCpConfig();
|
||||
hikariCpConfig.setConnectionTestQuery("select 1");
|
||||
DataSourceProperty dataSourceProperty = new DataSourceProperty();
|
||||
|
@ -20,15 +20,13 @@ import com.baomidou.dynamic.datasource.creator.DataSourceProperty;
|
||||
import com.baomidou.dynamic.datasource.creator.DefaultDataSourceCreator;
|
||||
import com.baomidou.dynamic.datasource.provider.AbstractJdbcDataSourceProvider;
|
||||
import com.baomidou.dynamic.datasource.provider.DynamicDataSourceProvider;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.jdbc.datasource.SimpleDriverDataSource;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
import java.sql.ResultSet;
|
||||
@ -41,14 +39,13 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.springframework.boot.test.context.SpringBootTest.WebEnvironment.RANDOM_PORT;
|
||||
|
||||
@SpringBootTest(classes = LoadDatasourceFromJDBCApplication.class, webEnvironment = RANDOM_PORT)
|
||||
@RunWith(SpringRunner.class)
|
||||
public class LoadDatasourceFromJDBCTest {
|
||||
|
||||
@Autowired
|
||||
DataSource dataSource;
|
||||
|
||||
@Test
|
||||
public void testExistDataSource() {
|
||||
void testExistDataSource() {
|
||||
DynamicRoutingDataSource ds = (DynamicRoutingDataSource) dataSource;
|
||||
assertThat(ds.getDataSources().keySet()).contains("master", "db1", "db2", "db3");
|
||||
}
|
||||
@ -68,13 +65,13 @@ class LoadDatasourceFromJDBCApplication {
|
||||
@Override
|
||||
protected Map<String, DataSourceProperty> executeStmt(Statement statement) throws SQLException {
|
||||
statement.execute("CREATE TABLE IF NOT EXISTS `DB`\n" +
|
||||
"(\n" +
|
||||
" `name` VARCHAR(30) NULL DEFAULT NULL,\n" +
|
||||
" `username` VARCHAR(30) NULL DEFAULT NULL,\n" +
|
||||
" `password` VARCHAR(30) NULL DEFAULT NULL,\n" +
|
||||
" `url` VARCHAR(30) NULL DEFAULT NULL,\n" +
|
||||
" `driver` VARCHAR(30) NULL DEFAULT NULL\n" +
|
||||
")");
|
||||
"(\n" +
|
||||
" `name` VARCHAR(30) NULL DEFAULT NULL,\n" +
|
||||
" `username` VARCHAR(30) NULL DEFAULT NULL,\n" +
|
||||
" `password` VARCHAR(30) NULL DEFAULT NULL,\n" +
|
||||
" `url` VARCHAR(30) NULL DEFAULT NULL,\n" +
|
||||
" `driver` VARCHAR(30) NULL DEFAULT NULL\n" +
|
||||
")");
|
||||
statement.executeUpdate("insert into DB values ('master','sa','','jdbc:h2:~/test','org.h2.Driver')");
|
||||
statement.executeUpdate("insert into DB values ('db1','sa','','jdbc:h2:mem:test2','org.h2.Driver')");
|
||||
statement.executeUpdate("insert into DB values ('db2','sa','','jdbc:h2:mem:test3','org.h2.Driver')");
|
||||
|
@ -22,13 +22,11 @@ import com.baomidou.dynamic.datasource.fixture.v1.service.nest.SchoolService;
|
||||
import com.baomidou.dynamic.datasource.fixture.v1.service.nest.Student;
|
||||
import com.baomidou.dynamic.datasource.fixture.v1.service.nest.StudentService;
|
||||
import com.baomidou.dynamic.datasource.fixture.v1.service.nest.TeacherService;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
import java.util.Arrays;
|
||||
@ -38,7 +36,6 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.springframework.boot.test.context.SpringBootTest.WebEnvironment.RANDOM_PORT;
|
||||
|
||||
@SpringBootTest(classes = NestApplication.class, webEnvironment = RANDOM_PORT)
|
||||
@RunWith(SpringRunner.class)
|
||||
public class NestDataSourceTest {
|
||||
|
||||
@Autowired
|
||||
@ -57,7 +54,7 @@ public class NestDataSourceTest {
|
||||
SchoolService schoolService;
|
||||
|
||||
@Test
|
||||
public void testNest() {
|
||||
void testNest() {
|
||||
DataSourceProperty masterDataSourceProperty = createDataSourceProperty("master");
|
||||
DataSourceProperty teacherDataSourceProperty = createDataSourceProperty("teacher");
|
||||
DataSourceProperty studentDataSourceProperty = createDataSourceProperty("student");
|
||||
|
@ -18,18 +18,15 @@ package com.baomidou.dynamic.datasource.fixture.v1;
|
||||
import com.baomidou.dynamic.datasource.DynamicRoutingDataSource;
|
||||
import com.baomidou.dynamic.datasource.creator.DataSourceProperty;
|
||||
import com.baomidou.dynamic.datasource.creator.DefaultDataSourceCreator;
|
||||
import com.baomidou.dynamic.datasource.fixture.v1.service.spel.CustomResultHandler;
|
||||
import com.baomidou.dynamic.datasource.fixture.v1.service.spel.User;
|
||||
import com.baomidou.dynamic.datasource.fixture.v1.service.spel.UserService;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
import org.springframework.test.web.servlet.MockMvc;
|
||||
import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
|
||||
import org.springframework.web.context.WebApplicationContext;
|
||||
@ -38,6 +35,7 @@ import javax.sql.DataSource;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
|
||||
import static org.springframework.boot.test.context.SpringBootTest.WebEnvironment.RANDOM_PORT;
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print;
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content;
|
||||
@ -45,14 +43,10 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
|
||||
import static org.springframework.test.web.servlet.setup.MockMvcBuilders.webAppContextSetup;
|
||||
|
||||
@SpringBootTest(classes = SPELApplication.class, webEnvironment = RANDOM_PORT)
|
||||
@RunWith(SpringRunner.class)
|
||||
public class SPELTest {
|
||||
|
||||
MockMvc mockMvc;
|
||||
|
||||
@Autowired
|
||||
private WebApplicationContext webApplicationContext;
|
||||
|
||||
@Autowired
|
||||
DataSource dataSource;
|
||||
|
||||
@ -62,15 +56,13 @@ public class SPELTest {
|
||||
@Autowired
|
||||
UserService userService;
|
||||
|
||||
@Before
|
||||
public void setup() {
|
||||
this.mockMvc = webAppContextSetup(webApplicationContext)
|
||||
.alwaysDo(new CustomResultHandler())
|
||||
.build();
|
||||
@BeforeEach
|
||||
void setup(WebApplicationContext webApplicationContext) {
|
||||
this.mockMvc = webAppContextSetup(webApplicationContext).defaultResponseCharacterEncoding(StandardCharsets.UTF_8).build();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSPEL() throws Exception {
|
||||
void testSPEL() {
|
||||
DataSourceProperty masterDataSourceProperty = createDataSourceProperty("master");
|
||||
DataSourceProperty tenant1_1DataSourceProperty = createDataSourceProperty("tenant1_1");
|
||||
DataSourceProperty tenant1_2DataSourceProperty = createDataSourceProperty("tenant1_2");
|
||||
@ -83,18 +75,20 @@ public class SPELTest {
|
||||
ds.addDataSource(tenant2_1DataSourceProperty.getPoolName(), dataSourceCreator.createDataSource(tenant2_1DataSourceProperty));
|
||||
ds.addDataSource(tenant2_2DataSourceProperty.getPoolName(), dataSourceCreator.createDataSource(tenant2_2DataSourceProperty));
|
||||
assertThat(ds.getDataSources().keySet()).contains("master", "tenant1_1", "tenant1_2", "tenant2_1", "tenant2_2");
|
||||
mockMvc.perform(MockMvcRequestBuilders.get("/users/session").characterEncoding(StandardCharsets.UTF_8.name()))
|
||||
.andDo(print())
|
||||
.andExpect(status().isOk())
|
||||
.andExpect(content().encoding(StandardCharsets.UTF_8.name()))
|
||||
.andReturn().getResponse().getContentAsString();
|
||||
mockMvc.perform(MockMvcRequestBuilders.get("/users/header").contentType(MediaType.APPLICATION_FORM_URLENCODED)
|
||||
.header("tenantName", "tenant1")
|
||||
.characterEncoding(StandardCharsets.UTF_8.name())
|
||||
).andDo(print())
|
||||
.andExpect(status().isOk())
|
||||
.andExpect(content().encoding(StandardCharsets.UTF_8.name()))
|
||||
.andReturn().getResponse().getContentAsString();
|
||||
assertDoesNotThrow(() -> {
|
||||
mockMvc.perform(MockMvcRequestBuilders.get("/users/session").characterEncoding(StandardCharsets.UTF_8))
|
||||
.andDo(print()).andExpectAll(
|
||||
status().isOk(),
|
||||
content().encoding(StandardCharsets.UTF_8)
|
||||
).andReturn().getResponse().getContentAsString();
|
||||
mockMvc.perform(MockMvcRequestBuilders.get("/users/header").contentType(MediaType.APPLICATION_FORM_URLENCODED)
|
||||
.header("tenantName", "tenant1")
|
||||
.characterEncoding(StandardCharsets.UTF_8)
|
||||
).andDo(print()).andExpectAll(
|
||||
status().isOk(),
|
||||
content().encoding(StandardCharsets.UTF_8)
|
||||
).andReturn().getResponse().getContentAsString();
|
||||
});
|
||||
assertThat(userService.selectSpelByKey("tenant1")).isEqualTo("tenant1");
|
||||
assertThat(userService.selecSpelByTenant(new User("tenant2"))).isEqualTo("tenant2");
|
||||
}
|
||||
|
@ -1,13 +0,0 @@
|
||||
package com.baomidou.dynamic.datasource.fixture.v1.service.spel;
|
||||
|
||||
import org.springframework.test.web.servlet.MvcResult;
|
||||
import org.springframework.test.web.servlet.ResultHandler;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
public class CustomResultHandler implements ResultHandler {
|
||||
@Override
|
||||
public void handle(MvcResult result) {
|
||||
result.getResponse().setCharacterEncoding(StandardCharsets.UTF_8.name());
|
||||
}
|
||||
}
|
@ -6,6 +6,10 @@
|
||||
"pattern":"\\QMETA-INF/druid-filter.properties\\E"
|
||||
}, {
|
||||
"pattern":"\\QMETA-INF/services/ch.qos.logback.classic.spi.Configurator\\E"
|
||||
}, {
|
||||
"pattern":"\\QMETA-INF/services/io.undertow.servlet.ServletExtension\\E"
|
||||
}, {
|
||||
"pattern":"\\QMETA-INF/services/io.undertow.websockets.jsr.WebsocketClientSslProvider\\E"
|
||||
}, {
|
||||
"pattern":"\\QMETA-INF/services/java.sql.Driver\\E"
|
||||
}, {
|
||||
@ -16,6 +20,8 @@
|
||||
"pattern":"\\QMETA-INF/services/org.junit.platform.launcher.TestExecutionListener\\E"
|
||||
}, {
|
||||
"pattern":"\\QMETA-INF/services/org.slf4j.spi.SLF4JServiceProvider\\E"
|
||||
}, {
|
||||
"pattern":"\\QMETA-INF/services/org.xnio.XnioProvider\\E"
|
||||
}, {
|
||||
"pattern":"\\QMETA-INF/spring-autoconfigure-metadata.properties\\E"
|
||||
}, {
|
||||
@ -79,15 +85,11 @@
|
||||
}, {
|
||||
"pattern":"\\Qdb/add-remove-datasource.sql\\E"
|
||||
}, {
|
||||
"pattern":"\\Qorg/apache/catalina/core/RestrictedFilters.properties\\E"
|
||||
}, {
|
||||
"pattern":"\\Qorg/apache/catalina/core/RestrictedListeners.properties\\E"
|
||||
}, {
|
||||
"pattern":"\\Qorg/apache/catalina/core/RestrictedServlets.properties\\E"
|
||||
}, {
|
||||
"pattern":"\\Qorg/apache/catalina/util/ServerInfo.properties\\E"
|
||||
"pattern":"\\Qio/undertow/version.properties\\E"
|
||||
}, {
|
||||
"pattern":"\\Qorg/h2/util/data.zip\\E"
|
||||
}, {
|
||||
"pattern":"\\Qorg/jboss/threads/Version.properties\\E"
|
||||
}, {
|
||||
"pattern":"\\Qorg/json/JSONObject.class\\E"
|
||||
}, {
|
||||
@ -378,6 +380,8 @@
|
||||
"pattern":"\\Qorg/springframework/boot/context/properties/EnableConfigurationPropertiesRegistrar.class\\E"
|
||||
}, {
|
||||
"pattern":"\\Qorg/springframework/boot/sql/init/dependency/DatabaseInitializationDependencyConfigurer.class\\E"
|
||||
}, {
|
||||
"pattern":"\\Qorg/springframework/boot/web/server/mime-mappings.properties\\E"
|
||||
}, {
|
||||
"pattern":"\\Qorg/springframework/context/ApplicationContextAware.class\\E"
|
||||
}, {
|
||||
@ -438,6 +442,10 @@
|
||||
"pattern":"\\Qorg/springframework/web/servlet/config/annotation/WebMvcConfigurationSupport.class\\E"
|
||||
}, {
|
||||
"pattern":"\\Qorg/springframework/web/servlet/config/annotation/WebMvcConfigurer.class\\E"
|
||||
}, {
|
||||
"pattern":"\\Qorg/xnio/Version.properties\\E"
|
||||
}, {
|
||||
"pattern":"\\Qorg/xnio/nio/Version.properties\\E"
|
||||
}]},
|
||||
"bundles":[]
|
||||
}
|
||||
|
21
pom.xml
21
pom.xml
@ -61,8 +61,8 @@
|
||||
<seata.version>1.4.2</seata.version>
|
||||
<lombok.version>1.18.28</lombok.version>
|
||||
<h2.version>2.2.220</h2.version>
|
||||
<atomikos.version>3.9.3</atomikos.version>
|
||||
<junit-platform-launcher.version>1.9.3</junit-platform-launcher.version>
|
||||
<atomikos.version>4.0.6</atomikos.version>
|
||||
<junit-jupiter.version>5.10.0</junit-jupiter.version>
|
||||
|
||||
<maven-clean-plugin.version>3.3.1</maven-clean-plugin.version>
|
||||
<maven-install-plugin.version>3.1.1</maven-install-plugin.version>
|
||||
@ -83,17 +83,17 @@
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>dynamic-datasource-creator</artifactId>
|
||||
<version>4.2.0</version>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>dynamic-datasource-spring</artifactId>
|
||||
<version>4.2.0</version>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>dynamic-datasource-spring-boot-common</artifactId>
|
||||
<version>4.2.0</version>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
@ -174,6 +174,13 @@
|
||||
<artifactId>h2</artifactId>
|
||||
<version>${h2.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit</groupId>
|
||||
<artifactId>junit-bom</artifactId>
|
||||
<version>${junit-jupiter.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
@ -426,7 +433,6 @@
|
||||
<dependency>
|
||||
<groupId>org.junit.platform</groupId>
|
||||
<artifactId>junit-platform-launcher</artifactId>
|
||||
<version>${junit-platform-launcher.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
@ -446,9 +452,6 @@
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>${maven-surefire-plugin.version}</version>
|
||||
<configuration>
|
||||
<includes>
|
||||
<include>com.baomidou.dynamic.datasource.fixture.v3.**</include>
|
||||
</includes>
|
||||
<excludes>
|
||||
<exclude>com.baomidou.dynamic.datasource.fixture.v1.**</exclude>
|
||||
</excludes>
|
||||
|
Loading…
x
Reference in New Issue
Block a user