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.
Sunday, October 26, 2008
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>
<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
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.
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.
- Custom Thread Scope
- Spring custom scope implementation for thread scoped beans.
- Dynamic Tiles Spring MVC Module
- Have a default Tiles definition that takes the url of an incoming request and assumes it should be the request body and dynamically inserts the url into the default definition.
- Spring by Example JDBC
- Some nice utitlies for helping initialize scripts and to make it easier using HSQL DB. They are especially useful for unit tests.
- Spring by Example JCR Module
- Utilities for helping to recurse through JCR Nodes.
- Spring by Example Util's HttpClientTemplate
- Callback template around Commons HttpClient.
- Spring by Example Util's HttpClientOxmTemplate
- Callback template around Commons HttpClient that uses Spring OXM to marshall and unmarshall XML for HTTP requests.
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.
Subscribe to:
Posts (Atom)