fix: PG 数据源填写数据库名称有横杠,报错 invalid database name
This commit is contained in:
parent
d26a67b119
commit
b9a05adc6c
@ -951,7 +951,7 @@ public class JdbcProvider extends DefaultJdbcProvider {
|
||||
break;
|
||||
case pg:
|
||||
PgConfiguration pgConfiguration = new Gson().fromJson(datasource.getConfiguration(), PgConfiguration.class);
|
||||
if (!pgConfiguration.getDataBase().matches("^[0-9a-zA-Z_]{1,}$")) {
|
||||
if (!pgConfiguration.getDataBase().matches("^[0-9a-zA-Z_.-]{1,}$")) {
|
||||
throw new Exception("Invalid database name");
|
||||
}
|
||||
break;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user