2

I can't entirely configure property-placeholder from system property because I can't give comma-separated list of resources. I'm trying to do like:

<context:property-placeholder location="${config-location}" />

I use system property to configure this. It works if I give one location only, like "classpath:main.properties", but it does not if I'm trying this: "classpath:main1.properties,classpath:main2.properties". If I use this latter exact value directly in xml configuration it works fine. I guess it resolves comma-separation earlier than placeholders. It should be the other way around.

P.S : version 4.3.4

Anas Lachheb
  • 441
  • 4
  • 17

1 Answers1

3

Another possible worth tryout would be,

<context:property-placeholder location="#{systemProperties['config-location']}" />

how to read System environment variable in Spring applicationContext

Community
  • 1
  • 1
kuhajeyan
  • 10,727
  • 10
  • 46
  • 71