0

I want to define dynamic mvc:resource in applicationContext.xml as in code below, which should either take property through Maven or read property (in my case application/project version) from any property file

<mvc:resources mapping="/static/${project.version}/**" location="/static/"/>

is there any way to read property value in applicationContext.xml as in above statment? I need to fix this in order to bust caching if new build deployed.

dextermini
  • 382
  • 3
  • 12
  • 1
    nope its not duplicate, here i want to read property in applicationContext.xml – dextermini Jan 14 '16 at 07:03
  • I cannot try it now, you could try the `context:property-placeholder` with the property and make the resource: ``. Its worth a shot I guess. – William Callahan Jan 14 '16 at 07:03
  • 1
    oops!. My mistake. Can you try this [link](http://stackoverflow.com/questions/3886753/access-maven-project-version-in-spring-config-files) – Vivek Singh Jan 14 '16 at 07:05
  • @WilliamCallahan thats what i need, however filtering is one the solution it not working in my case. But reading from property file is another good idea. – dextermini Jan 14 '16 at 07:05

0 Answers0