I am creating a spring mvc crud application and using H2 as the embedded database using the following config:
<
jdbc:embedded-database id="dataSource" type="H2">
<jdbc:script location="classpath:schema.sql"/>
<jdbc:script location="classpath:test-data.sql"/>
</jdbc:embedded-database>
The h2 db works fine for me. My only problem is that whenever I restart the server, all my changes are lost as each time the server starts it creates the DB again. Is there a way to store that information and not wipe it on restart. The reason I want this is because I don't want a separate DB server installed. I want to create a war file and all the client has to do is deploy this file and not care about installing a db. This is a small desktop application which would not have huge data hence I want to use an embedded db.