This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

Placeholder Help

Sep 15th, 2011, 01:22 PM

I'm using SAS 1.1 and I can not seem to get property placeholders to work and it must be something simple I'm not doing because it's to obvious for it not to work. I have a very simple application that loads an application context and then traces out the properties in it and it doesn't work. I even tried creating another class and autowireing values to it and it doesn't seem to replace the placeholders.

Nothing I have tried has been able to get "s1" to resolve to what I was expecting according to the documentation section 2.1.1.4. External property files
I've been pulling my hair out with this so any help would be appreciated!

Comment

Putting the properties in an external config file semi-worked. First, it failed because it couldn't find FlexPropertyPlaceholderConfigurer which wasn't a big deal as I get around that as with everything else in SAS. Now, any properties that defined in an external file will resolve correctly to stuff that is auto-wired and other objects using the placeholders for values.

However, any properties defined in the XML using <property name="s1" value="s1 value"/> throws a "Error: Could not resolve placeholder '${s1}'" when used somewhere.

So, I'll just move all properties to an external file to get around it.