Configuration in the Configuration Configuration Library used in Play is a JSON-like structure. Dot notation is syntactic sugar for creating nested objects ( { ... } in JSON). For instance:
application.url="http://example.com" application.images.logo="http://example.com/img/1.png" application.images.header="http://example.com/img/3.png"
equivalent to the following JSON:
{ "application": { "url": "http://example.com", "images": { "logo": "http://example.com/img/1.png", "header": "http://example.com/img/3.png" } } }
In your example, you first assign the string application.url , and then try to add keys to it (the url key in application.url.images ), for example, this is a JSON object, not a string. I do not know the exact behavior of Configafe Config in this case and why it does not cause an error immediately when reading the configuration file.
Try changing the hierarchy of configuration keys, i.e.:
application.url.prefix="http://www.mydomain.com" application.url.images.prefix="http://www.anotherdomain.com" application.url.images.logo="${application.url.images}/logo.png"
Here application.url will be an object with the keys prefix and images , and application.url.images will be an object with the keys prefix and logo .
source share