0

I currently have a Spring application.properties with 2 properties defined as follows:

validator.url=http://location.com/${domain}/${family}
query.validator.url=${validator.url}

Currently my application resolves query.validator.url to be ${validator.url} is there anyway that I can have it resolve to the same value as validator.url which is http://location.com/${domain}/${family}

Note: ${domain} and ${family} don't resolve, they are handled in code.

jiveturkey
  • 2,484
  • 1
  • 23
  • 41

1 Answers1

0

Try the following:

validator.url=http://location.com/#{'$'}{domain}/#{'$'}{family}
query.validator.url=${validator.url}

Both validator.url and query.validator.url will resolve to http://location.com/${domain}/${family}

Alternatively, you can create a property for the $, which you can then use inside validator.url, e.g.:

var=$
validator.url=http://location.com/${var}{domain}/${var}{family}

There's an issue regarding this on Spring's JIRA

TwiN
  • 3,554
  • 1
  • 20
  • 31