Working with Spring Embedded Database
Sometimes it is very useful to work with an in memory databases when you want to demonstrate certain database centric features of an application during development phase. Spring supports HSQL, H2, and Derby as default embedded databases but, you can also use an extensible API to plug in new embedded database types and “DataSource” implementations. In this tutorial we’ll see how to configure and use embedded database (HSQL) using spring. Spring supports XML as well as Programmatic configuration of beans. For, simplicity I’ll use XML based configuration in this article. Here are the items that we’ll cover in this article 1. Configuring embedded database using spring. 2. Define a simple domain object (User) and creating a simple DAO layer for accessing underling embedded database. 3. Create two Spring MVC controllers & views to create users and display users. I’ll suggest you to download the example code for this article from SVN before you start, this will help you