mirror of
https://github.com/dataease/dataease.git
synced 2026-05-15 05:22:13 +08:00
fix: h2 校验失败
This commit is contained in:
@@ -15,10 +15,9 @@ import java.util.List;
|
||||
@Component("h2")
|
||||
public class H2 extends DatasourceConfiguration {
|
||||
private String driver = "org.h2.Driver";
|
||||
private List<String> illegalParameters = Arrays.asList("INIT", "RUNSCRIPT");
|
||||
|
||||
public String getJdbc() {
|
||||
for (String illegalParameter : illegalParameters) {
|
||||
for (String illegalParameter : getH2IllegalParameters()) {
|
||||
if (jdbc.toUpperCase().replace("\\", "").contains(illegalParameter)) {
|
||||
DEException.throwException("Has illegal parameter: " + jdbc);
|
||||
}
|
||||
@@ -26,4 +25,9 @@ public class H2 extends DatasourceConfiguration {
|
||||
|
||||
return jdbc;
|
||||
}
|
||||
|
||||
private List<String> getH2IllegalParameters() {
|
||||
return Arrays.asList("INIT", "RUNSCRIPT");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user