Skip to content

Commit

Permalink
File properties predilection
Browse files Browse the repository at this point in the history
Now the CLI argument is being overwritten by the configuration file.
  • Loading branch information
SnifferNandez committed Sep 20, 2022
1 parent 067969f commit 819c88a
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions h2/src/main/org/h2/server/web/WebServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -314,16 +314,6 @@ public void init(String... args) {
serverPropertiesDir = args[++i];
}
}
Properties prop = loadProperties();
port = SortedProperties.getIntProperty(prop,
"webPort", Constants.DEFAULT_HTTP_PORT);
ssl = SortedProperties.getBooleanProperty(prop,
"webSSL", false);
allowOthers = SortedProperties.getBooleanProperty(prop,
"webAllowOthers", false);
setExternalNames(SortedProperties.getStringProperty(prop, "webExternalNames", null));
setAdminPassword(SortedProperties.getStringProperty(prop, "webAdminPassword", null));
commandHistoryString = prop.getProperty(COMMAND_HISTORY);
for (int i = 0; args != null && i < args.length; i++) {
String a = args[i];
if (Tool.isOption(a, "-webPort")) {
Expand Down Expand Up @@ -352,6 +342,16 @@ public void init(String... args) {
trace = true;
}
}
Properties prop = loadProperties();
port = SortedProperties.getIntProperty(prop,
"webPort", Constants.DEFAULT_HTTP_PORT);
ssl = SortedProperties.getBooleanProperty(prop,
"webSSL", false);
allowOthers = SortedProperties.getBooleanProperty(prop,
"webAllowOthers", false);
setExternalNames(SortedProperties.getStringProperty(prop, "webExternalNames", null));
setAdminPassword(SortedProperties.getStringProperty(prop, "webAdminPassword", null));
commandHistoryString = prop.getProperty(COMMAND_HISTORY);
// if (driverList != null) {
// try {
// String[] drivers =
Expand Down

0 comments on commit 819c88a

Please sign in to comment.