Maven Properties not referenced in properties file -
i have properties in maven pom.xml.
<properties> <number>3</number> <age>38</age> </properties>
(they random properties)
in properties file, lets call resource.properties, have following:
value1 = ${number} value2 = ${age}
when spring tries read properties file, cannot reference ${number}
saying cannot found.
why , how can make work? or doing not possible @ all.
edit: have enabled filtering still not work. resource in src/test/resources
directory.
here part of pom enable filtering.
<build> ... <resources> <resource> <directory>src/test/resources</directory> <filtering>true</filtering> </resource> </resources> ... </build>
you need tell maven files uses replace placeholders e.g
<resource> <directory>src/main/resources</directory> <filtering>true</filtering> </resource>
see maven filter
Comments
Post a Comment