Jack
Jack

Reputation: 89

scala play application.conf read variables

Can I create variables in application.conf and consume by application.conf? Basically I don't want to hard code it.

I tried dominName = "test.com" and consume with $domainName but not working.

Upvotes: 0

Views: 184

Answers (1)

vdebergue
vdebergue

Reputation: 2404

You may need to use curly braces around the variable name: ${domainName}

You can find more example and information about HOCON on this page

Upvotes: 1

Related Questions