Just created a simple spring-boot project from the spring initializer. I went to add a local h2 db for testing and am unable to login. Seems that it cannot create the test d
I had the same error and I found these to be helpful:
Adding a pre-2019 version to the pom.xml file as below:
com.h2database
h2
1.4.193
This fixes the error but isn't the right way to do it. The newer version of H2 Database do not create a new database as it doesn't exist by default and are enabled to false for security purposes.
A better way would be adding making changes to url as:
jdbc:h2:mem:testdb;IFEXISTS=FALSE;
Hope it helps. I made changes in my application.properties
file.