I have successfully created a spring boot application that uses the H2 embedded database in-memory. I would now like to change this to a file based version that will persist
Create a file .h2.server.properties in your class path and put below things and try again. You can create this file in resources folder.
#H2 Server Properties
0=H2 File|org.h2.Driver|jdbc\:h2\:file\:~/test;DB_CLOSE_ON_EXIT=FALSE
# Enable if you want other applications to connect
#webAllowOthers=true
#webPort=8082
#webSSL=false