Spring PropertyPlaceholderConfigurer beans

Posted by OrganicVeggie Mon, 05 May 2008 21:34:00 GMT

Multiple PropertyPlaceholderConfigurer Beans

So I found a scenario today where we had two different PropertyPlaceHolderConfigurer beans declared in two separate XML files. Unfortunately, the second property file wasn’t getting loaded, so we would get errors about Spring being unable to resolve particular properties.

I found this great post summarizing the solution:

http://dotal.wordpress.com/2007/09/14/mulitple-propertyplaceholderconfigurer-configurations/

Basically, you have to update the definition for the first PropertyPlaceHolderConfigurer bean that gets loaded and add the ignoreUnresolvablePlaceholders property:

<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
    <property name="location" value="classpath:app.properties"/>
    <property name="ignoreUnresolvablePlaceholders" value="true"/>
</bean>

Posted in  | Tags ,  | no comments

RESTful Web Services for Java

Posted by OrganicVeggie Tue, 04 Sep 2007 16:50:00 GMT

After my recent work with Ruby, I've really started looking at creating RESTful web services in Java. I work with a client who has a lot of Struts applications, so my real area of interest is figuring out how to get Struts to provide RESTful interfaces. Here's what I've found so far (much of which doesn't relate to Struts):

More thoughts to follow.

Posted in  | Tags , ,  | no comments