Check out example codes for "H2 enabling remote database creation first". It will help you in understanding the concepts better.

Code Example 1

//Try this in your application.properties. It worked for me:

  spring.datasource.url=jdbc:h2:~/test
  spring.datasource.driverClassName=org.h2.Driver
  spring.datasource.username=sa
  spring.datasource.password=
  spring.jpa.database-platform=org.hibernate.dialect.H2Dialect

Learn ReactJs, React Native from akashmittal.com