Strange.. My test is working as expected with the exact same setup only difference is I run it from a testcase and not a web application. But in theory the behavior should be the same.
Strange.. My test is working as expected with the exact same setup only difference is I run it from a testcase and not a web application. But in theory the behavior should be the same.
Marten Deinum
Java Consultant / Pragmatist / Open Source Enthousiast / Author
Pro Spring MVC: With Web Flow
Conspect
Have you read the reference guide.
Use the [ code ] tags, young padawan
Hi Marten!
I actually decided to give up (temporarily) on this issue and tried to switch back to a config without profiles.
Then I realized that the issue was elsewhere. For some reason, Spring does not like this:
Notice the nested "default" directory.Code:<context:property-placeholder location="classpath*:META-INF/spring/*.properties" /> <context:property-placeholder location="classpath*:META-INF/spring/default/*.properties" />
I had forgotten to mention the presence of the first line (above) in my original post because I deemed it irrelevant (sorry about that)...
The problem with that is that by default a property-placeholder resolves ALL placeholders if one cannot be found it throws an exception. You have 2 solutions for this.
1. set the property ignore-unresolvable to true on at least the first placeholder (however order is basically undetermined so you might need to set them on both)
2. Use a single property-placeholder which loads files from both location, use a , seperated location for that (simply putting both in).
Marten Deinum
Java Consultant / Pragmatist / Open Source Enthousiast / Author
Pro Spring MVC: With Web Flow
Conspect
Have you read the reference guide.
Use the [ code ] tags, young padawan
Thanks Marten. That fixed it!