fixed:修改sql文件执行过滤的判断方式
This commit is contained in:
@@ -21,7 +21,7 @@ public class DbMigrationConfig {
|
|||||||
|
|
||||||
private String table = "core_config_db";
|
private String table = "core_config_db";
|
||||||
private List<String> locations = CollUtil.newArrayList("classpath*:db/migration/*.sql");
|
private List<String> locations = CollUtil.newArrayList("classpath*:db/migration/*.sql");
|
||||||
private String ignoreSqls = "drop,delete";
|
private String ignoreSqls = "drop table,delete from";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检查数据库是否存在
|
* 检查数据库是否存在
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ public class DbMigrationInitializer implements ServletContextInitializer {
|
|||||||
if (StrUtil.isEmpty(sql)) {
|
if (StrUtil.isEmpty(sql)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (StrUtil.startWithAnyIgnoreCase(sql, StrUtil.splitToArray(dbMigrationConfig.getIgnoreSqls(), ","))) {
|
if (StrUtil.containsAnyIgnoreCase(sql, StrUtil.splitToArray(dbMigrationConfig.getIgnoreSqls(), ","))) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user