In properties based configuration file every property was defined as a string and only by defining expected format it was properly converted to expected value. In DSL it is possible to set values in two ways:
- as an object
- Using this format you set list as a list and integer is set as an integer.
Type | Description |
---|---|
string |
Wrap it in |
integer |
Just put value, ie. to set |
long |
Put value and follow it with |
float |
Put value and follow it with |
boolean |
To set value just use |
list |
Lists can be of many types and to make it simple we decided to use as a comma separated list of values in proper format wrapped
in
You can write it in multiple lines if you want: [ 'alfa' 'beta' 'gamma' ] |
map |
Maps can be written as a block of properties wrapped in { test = true ssl = false ssl-certificate = '/test/cert.pem' another-map = { key = 'value' } } or in single line (separation with spaces is not required): { test = true, ssl = false, ssl-certificate = '/test/cert.pem' } |
- as a plain string
- Very similar to properties based configuration, in fact values are passed in same format and later are converted to correct type by checking type expected by bean. (Not recommended)
Type | Description |
---|---|
string |
Just put value, ie. to set |
integer |
Just put value, ie. to set |
long |
Put value, ie. to set |
float |
Put value, ie. to set |
boolean |
To set value just use |
list |
List needs to be written as comma separated list of values, ie. |
map |
Not possible |