Using the H2 database
The first portion of this exercise involves setting up an instance of the Java-based H2 which is an open-source, in-memory and embedded relational database written in Java. It is designed to be fast, lightweight, and easy to use. H2 database will be 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...