This is a example of how to use JavaConfig with Spring, HSQLDB and Hibernate