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 Java | Tags java, spring | no comments
Posted by OrganicVeggie
Mon, 28 Apr 2008 21:39:00 GMT
Web services that offer throw-away (aka disposable) email addresses include:
SpamGourmet is open-source and available for download. But I’m still looking for an open-source webmail package, like Zimbra, that actually has integrated support for disposable email addresses.
Posted in Technology | Tags email, spam, web | no comments
Posted by OrganicVeggie
Sat, 26 Apr 2008 02:37:00 GMT
A new year and a new blog.
After getting my own slice on SliceHost, I upgraded to Typo 5.x. Unfortunately, I had little luck trying to preserve everything. So, I lost a few of the articles and all of the comments. sigh
Time to start again.
Hopefully Typo 5 and Slicehost will work out better for me.
Tags news | no comments
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 Java | Tags java, REST, struts | no comments
Posted by OrganicVeggie
Mon, 20 Aug 2007 16:30:00 GMT
I found a nice little article from a few months ago on The Rails Way. Written by koz, Assocation Proxies talks about some Best Practices for using assocations within Rails. I really felt the suggestions hit the proverbial nail on the head in terms of following the DRY principles. The first suggestion was on the best way to restrict access to user specific information. It's incredibly useful to take advantage your RESTful patterns and make a single call like:
@todo_list = current_user.todo_lists.find(params[:id])
Of course, I also loved the final suggestion in Case Three: using a has_many with a condition on it:
has_many :completed_lists, :class_name => "TodoList", :conditions => { :completed => true }
Excellent!
Posted in Rails | Tags associations, has_many, rails, ruby, security | no comments