Using the H2 database
The first portion of this exercise involves setting up an instance of the Java-based H2 relational database, populated with the Spring Security default schema. We'll configure H2 to run in memory using Spring's EmbeddedDatabase configuration feature—a significantly simpler method of configuration than
setting up the database by hand. You can find additional information on the H2 website at http://www.h2database.com/.
Keep in mind that in our sample application, we'll primarily use H2 due to its ease of setup. Spring Security will work with any database that supports ANSI SQL out of the box. We encourage you to tweak the configuration and use the database of your preference if you're following along with the examples. As we didn't want this portion of the book to focus on the complexities of database setup, we chose convenience over realism for the purpose of the exercises.