I'm looking at the way to get a redirection of resources in my webapp depending on the Operating System. I wanted to change the path of some resources depending on whether you use windows or linux because there are people on the team who use both and it is inefficient to comment and uncomment. But I have found an error that I am not able to solve, I am surely doing something very wrong:
Replacement target file (src/main/resources/context/mvc.xml):
<mvc:resources mapping="/photos/*" location="${file.mapping}"></mvc:resources>
maven profile:
<profile>
<id>dos</id>
<activation>
<os>
<family>dos</family>
</os>
</activation>
<properties>
<file.mapping>file:///C:/software/photos/</file.mapping>
</properties>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>
</profile>
Recurring error:
Could not resolve placeholder 'file.mapping' in value "${file.mapping}"