Merge pull request #647 from corda/ags_2018-03-29

Merge of CORDA-1277
This commit is contained in:
szymonsztuka 2018-03-29 11:01:12 +01:00 committed by GitHub
commit bf5f812b68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 24 additions and 4 deletions

View File

@ -34,6 +34,8 @@ from the previous milestone release.
* Introduced a placeholder for custom properties within ``node.conf``; the property key is "custom". * Introduced a placeholder for custom properties within ``node.conf``; the property key is "custom".
* Property keys with double quotes (e.g. `"key"`) in ``node.conf`` are no longer allowed, for rationale refer to :doc:`corda-configuration-file`.
* java.math.BigInteger serialization support added. * java.math.BigInteger serialization support added.
* java.security.cert.CRLReason added to the default Whitelist. * java.security.cert.CRLReason added to the default Whitelist.

View File

@ -22,6 +22,15 @@ Format
The Corda configuration file uses the HOCON format which is superset of JSON. Please visit The Corda configuration file uses the HOCON format which is superset of JSON. Please visit
`<https://github.com/typesafehub/config/blob/master/HOCON.md>`_ for further details. `<https://github.com/typesafehub/config/blob/master/HOCON.md>`_ for further details.
Please do NOT use double quotes (``"``) in configuration keys.
Node setup will log `Config files should not contain \" in property names. Please fix: [key]` as error
when it founds double quotes around keys.
This prevents configuration errors when mixing keys containing ``.`` wrapped with double quotes and without them
e.g.:
The property `"dataSourceProperties.dataSourceClassName" = "val"` in ``reference.conf``
would be not overwritten by the property `dataSourceProperties.dataSourceClassName = "val2"` in ``node.conf``.
Defaults Defaults
-------- --------
A set of default configuration options are loaded from the built-in resource file ``/node/src/main/resources/reference.conf``. A set of default configuration options are loaded from the built-in resource file ``/node/src/main/resources/reference.conf``.

View File

@ -3,9 +3,9 @@ keyStorePassword : "cordacadevpass"
trustStorePassword : "trustpass" trustStorePassword : "trustpass"
dataSourceProperties : { dataSourceProperties : {
dataSourceClassName : org.h2.jdbcx.JdbcDataSource dataSourceClassName : org.h2.jdbcx.JdbcDataSource
"dataSource.url" : "jdbc:h2:file:"${baseDirectory}"/persistence" dataSource.url : "jdbc:h2:file:"${baseDirectory}"/persistence"
"dataSource.user" : sa dataSource.user : sa
"dataSource.password" : "" dataSource.password : ""
} }
p2pAddress : "my-corda-node:10002" p2pAddress : "my-corda-node:10002"
rpcSettings = { rpcSettings = {

View File

@ -58,7 +58,16 @@ object ConfigHelper {
.withFallback(appConfig) .withFallback(appConfig)
.withFallback(defaultConfig) .withFallback(defaultConfig)
.resolve() .resolve()
log.info("Config:\n${finalConfig.root().render(ConfigRenderOptions.defaults())}") log.info("Config:\n${finalConfig.root().render(ConfigRenderOptions.defaults())}")
val entrySet = finalConfig.entrySet().filter { entry -> entry.key.contains("\"") }
for (mutableEntry in entrySet) {
val key = mutableEntry.key
log.error("Config files should not contain \" in property names. Please fix: ${key}")
}
return finalConfig return finalConfig
} }