Spring Standalone DB Example projects putting together Spring with data access layer without a web container. See the unit test for demonstration of how to use this code/pattern. The SpringHelper and the contents of the resources directory are also relevant.