Spring: H2 Database persistence
You miss the auto-reconnect feature
spring.datasource.url=jdbc:h2:file:~/test2;DB_CLOSE_ON_EXIT=FALSE;AUTO_RECONNECT=TRUE
So that for example works:
spring.datasource.url=jdbc:h2:file:~/test2;DB_CLOSE_ON_EXIT=FALSE;AUTO_RECONNECT=TRUEspring.datasource.username=adminspring.datasource.password=passwordspring.datasource.driver-class-name=org.h2.Driver#spring.jpa.show-sql=truespring.jpa.hibernate.ddl-auto=update
persistence comes from property spring.jpa.hibernate.ddl-auto being update instead of being create