How to Access H2 Database with Spring JDBC

In this guide, I will show you how to create a Spring Boot application and use Spring JDBC to access an in-memory H2 database. The guide describes in a step-by-step manner how to create a Data Access Object (DAO), and use the JDBCTemplate to perform CRUD operations on the "mammal" table. Finally I will show you how to compile and run the application from the command line and view the H2 database via the console.