File tree 5 files changed +27
-7
lines changed
example-code/src/main/resources
kotlin/net/corda/node/services/config
5 files changed +27
-7
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,8 @@ from the previous milestone release.
34
34
35
35
* Introduced a placeholder for custom properties within ``node.conf ``; the property key is "custom".
36
36
37
+ * Property keys with double quotes (e.g. `"key" `) in ``node.conf `` are no longer allowed, for rationale refer to :doc: `corda-configuration-file `.
38
+
37
39
* java.math.BigInteger serialization support added.
38
40
39
41
* java.security.cert.CRLReason added to the default Whitelist.
Original file line number Diff line number Diff line change @@ -22,6 +22,15 @@ Format
22
22
The Corda configuration file uses the HOCON format which is superset of JSON. Please visit
23
23
`<https://github.com/typesafehub/config/blob/master/HOCON.md >`_ for further details.
24
24
25
+ Please do NOT use double quotes (``" ``) in configuration keys.
26
+
27
+ Node setup will log `Config files should not contain \" in property names. Please fix: [key] ` as error
28
+ when it founds double quotes around keys.
29
+ This prevents configuration errors when mixing keys containing ``. `` wrapped with double quotes and without them
30
+ e.g.:
31
+ The property `"dataSourceProperties.dataSourceClassName" = "val" ` in ``reference.conf ``
32
+ would be not overwritten by the property `dataSourceProperties.dataSourceClassName = "val2" ` in ``node.conf ``.
33
+
25
34
Defaults
26
35
--------
27
36
A set of default configuration options are loaded from the built-in resource file ``/node/src/main/resources/reference.conf ``.
@@ -261,4 +270,4 @@ Longer term these keys will be managed in secure hardware devices.
261
270
:permissions: A list of permissions for starting flows via RPC. To give the user the permission to start the flow
262
271
``foo.bar.FlowClass ``, add the string ``StartFlow.foo.bar.FlowClass `` to the list. If the list
263
272
contains the string ``ALL ``, the user can start any flow via RPC. This value is intended for administrator
264
- users and for development.
273
+ users and for development.
Original file line number Diff line number Diff line change @@ -3,9 +3,9 @@ keyStorePassword : "cordacadevpass"
3
3
trustStorePassword : "trustpass"
4
4
dataSourceProperties : {
5
5
dataSourceClassName : org.h2.jdbcx.JdbcDataSource
6
- " dataSource.url" : "jdbc:h2:file:"${baseDirectory}"/persistence"
7
- " dataSource.user" : sa
8
- " dataSource.password" : ""
6
+ dataSource.url : "jdbc:h2:file:"${baseDirectory}"/persistence"
7
+ dataSource.user : sa
8
+ dataSource.password : ""
9
9
}
10
10
p2pAddress : "my-corda-node:10002"
11
11
rpcSettings = {
Original file line number Diff line number Diff line change @@ -35,7 +35,16 @@ object ConfigHelper {
35
35
.withFallback(appConfig)
36
36
.withFallback(defaultConfig)
37
37
.resolve()
38
+
39
+
38
40
log.info(" Config:\n ${finalConfig.root().render(ConfigRenderOptions .defaults())} " )
41
+
42
+ val entrySet = finalConfig.entrySet().filter { entry -> entry.key.contains(" \" " ) }
43
+ for (mutableEntry in entrySet) {
44
+ val key = mutableEntry.key
45
+ log.error(" Config files should not contain \" in property names. Please fix: ${key} " )
46
+ }
47
+
39
48
return finalConfig
40
49
}
41
50
}
Original file line number Diff line number Diff line change @@ -4,9 +4,9 @@ keyStorePassword = "cordacadevpass"
4
4
trustStorePassword = "trustpass"
5
5
dataSourceProperties = {
6
6
dataSourceClassName = org.h2.jdbcx.JdbcDataSource
7
- " dataSource.url" = "jdbc:h2:file:"${baseDirectory}"/persistence;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=10000;WRITE_DELAY=100;AUTO_SERVER_PORT="${h2port}
8
- " dataSource.user" = sa
9
- " dataSource.password" = ""
7
+ dataSource.url = "jdbc:h2:file:"${baseDirectory}"/persistence;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=10000;WRITE_DELAY=100;AUTO_SERVER_PORT="${h2port}
8
+ dataSource.user = sa
9
+ dataSource.password = ""
10
10
}
11
11
database = {
12
12
transactionIsolationLevel = "REPEATABLE_READ"
You can’t perform that action at this time.
0 commit comments