Sunday, October 26, 2008

Spring by Example Web Module GWT & Comet Support

The Spring by Example Web Module has added a Spring GWT Controller for standard GWT usage and also Spring Bayeux integration for using Comet on Jetty.

Wednesday, October 22, 2008

Spring by Example RSS Feed

The Spring by Example RSS feed has been updated to a new url, which is http://www.springbyexample.org/feed/. Before the feed was generated by the TWiki so it wasn't also including the static examples.

Spring by Example Update

The site's static examples have just been updated to version 0.91. It's mainly some minor updates correcting errors, adding a setup appendix that is more detailed than the old setup, and updating the articles to point to the new setup appendix. Also a new custom scope module for the ServletContext has been added.

Custom ServletContext Scope Module

A new module has just been posted. It's a custom scope for a ServletContext. Typically a Spring singleton would be adequate for a single application, but this could be used to share a bean across multiple web applications if the servlet container has cross context support.


<bean class="org.springframework.beans.factory.config.CustomScopeConfigurer">
<property name="scopes">
<map>
<entry key="servletContext">
<bean class="org.springbyexample.web.context.ServletContextScope" />
<property name="context" value="/advanced-form" />
</bean>
</entry>
</map>
</property>
</bean>

Saturday, October 11, 2008

Commons Configuration with Spring Modules

DanielP has kindly posted an example on how to use Commons Configuration with Spring Modules for loading properties from a database and using them in your Spring Configuration. Thank you DanielP.

Spring by Example

Spring by Example was started at the beginning of 2008 and now has over 25 examples. I've been writing about it in my blog Spring, Java, and other Fun Stuff. I decided to start a separate blog to link to from examples to have any user discussions take place here, and use my blog to talk more about anything I've been doing. Below is the original announcement on my blog from March 7th, 2008 with the links updated to point to the new static format instead of to the TWiki.

The Spring by Example site is finally open! I've been working this for a couple of months, but wanted it to be fairly nice when it went live. It has a few good examples and I have more to post. A few people I know have said they will contribute examples as they have time also. These are some of my favorite examples posted so far.


Tim Voet also posted an example using a BeanPostProcessor to dynamically insert a logger based on the bean's class if it has a setLogger method. This is a nice way to avoid typos when creating loggers.