This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Spring and the fly likes use pom properties in xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "use pom properties in xml" Watch "use pom properties in xml" New topic

use pom properties in xml

Rakesh Basani
Ranch Hand

Joined: Jun 04, 2012
Posts: 38
Hi friends,

How can I use pom properties or system properties in xml files using ${ } notation.
I have a property called CONF_PATH in pom. I am using that in ReloadableResourceBundleMessageSource's value tag...


But it is not working.. Please help me out..

In pom.. I used <resources> tag


My xml file is in src/main/resources folder

Thanks in advance,
Bill Gorder

Joined: Mar 07, 2010
Posts: 1682

Please UseCodeTags

Use the PropertyPlaceholderConfigurer

see the reference documentation

To inject system properties you can use this notation with SPEL


[How To Ask Questions][Read before you PM me]
I agree. Here's the link:
subject: use pom properties in xml
It's not a secret anymore!