From 425183fe73d3ef3e062e9505e76afbdb36817463 Mon Sep 17 00:00:00 2001 From: inrgihc Date: Mon, 10 May 2021 10:52:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=E5=B8=A6=E6=98=9F=E5=8F=B7?= =?UTF-8?q?=E7=9A=84=E6=AD=A3=E5=88=99=E5=8C=B9=E9=85=8D=E6=96=B9=E5=BC=8F?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/gitee/dbswitch/data/service/MainService.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dbswitch-data/src/main/java/com/gitee/dbswitch/data/service/MainService.java b/dbswitch-data/src/main/java/com/gitee/dbswitch/data/service/MainService.java index c24a5bf5..65733f75 100644 --- a/dbswitch-data/src/main/java/com/gitee/dbswitch/data/service/MainService.java +++ b/dbswitch-data/src/main/java/com/gitee/dbswitch/data/service/MainService.java @@ -16,6 +16,8 @@ import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Objects; +import java.util.regex.Pattern; + import javax.sql.DataSource; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -118,7 +120,11 @@ public class MainService { this.doDataMigration(td, sourceProperties, sourceDataSource, writer); } } else { - if (includes.contains(tableName)) { + if (includes.size() == 1 && includes.get(0).contains("*")) { + if (Pattern.matches(includes.get(0), tableName)) { + this.doDataMigration(td, sourceProperties, sourceDataSource, writer); + } + } else if (includes.contains(tableName)) { this.doDataMigration(td, sourceProperties, sourceDataSource, writer); } }