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

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -