How do I reference Java system properties in the server.properties file?
I'm passing in values to the JVM using the -D flag, ie: -Ddb.host=localhost
I'm trying to configure a database connection, here's the relevant block from my server.properties:
I've verified that the referenced properties are available from System.getProperty(). I know I can use a listener before the SC framework starts and I can add them manually to the Config, but I was curious if something like this is already supported in server.properties directly.
Right now I get the error:
I'm passing in values to the JVM using the -D flag, ie: -Ddb.host=localhost
I'm trying to configure a database connection, here's the relevant block from my server.properties:
Code:
sql.defaultDatabase:Mysql sql.defaultDatabase.type:mysql sql.defaultDatabase.interface.type:dataSource sql.defaultDatabase.driver:org.mariadb.jdbc.MariaDbDataSource sql.defaultDatabase.driver.serverName:${db.host} sql.defaultDatabase.driver.portNumber:3306 sql.defaultDatabase.driver.databaseName:${db.name} sql.defaultDatabase.driver.user:${db.user} sql.defaultDatabase.driver.password:${db.password}
Right now I get the error:
Code:
java.lang.Exception: variable expansion failed for variable: db.host
Comment