Yet it was not working and the value was coming out as "$myparam:defaultVal".@Value("${myParam:defaultVal")private String myParam;
What's the issue?
Eventually i stumbled upon the issue via this spring issue. I also saw it addressed here although there is a mistake as it is not sufficient to use util:properties as explained here. So, to make this work if you are using XML just add this in:
<context:property-placeholder location="classpath:/myfile.properties"/>
Now hopefully this wont happen again to me...