spring项目中properties中变量互相调用

spring项目中的properties中如何做到像springboot application.properties 变量之间互相调用

比如这样的 application.properties中可以这样写

rootPath=e:/root
filePath1=${rootPath}/file-path/testFile1.xml
filePath2=${rootPath}/file-path/testFile2.xml

但在spring项目中 如何实现在properties通过${}  调用变量

将文件properties 引入到spring文件中即可

 

怎么引入:

<context:property-placeholder location="classpath: 你的properties文件名,一般放在resources下"/>