d-man
d-man

Reputation: 58063

Spring load context placeholder external property file from environment variable

I am using java Spring 3.x

I wants to load context place holder property file from OS environment variable. Following is my code

<context:property-placeholder location="file:#{ systemProperties['RESOURCE_PATH']}/jdbc.properties,

where RESOURCE_PATH is my linux environment variable but i am getting file not found exception.

Any help appreciated.

Upvotes: 0

Views: 1950

Answers (1)

Jukka
Jukka

Reputation: 4663

System properties are Java system properties, not OS. Try using the variable systemEnvironment instead.

Upvotes: 1

Related Questions