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
As Stuck said.
Simply remove the semicolon:
wrong: jdbc:h2:mem:testdb;
correct: jdbc:h2:mem:testdb
In earlier version of spring, default url will be jdbc:h2:mem:testdb and testdb was created by default. from 2.3.0 onwards, if url is not mentioned it will auto generate database name. auto generated database name can be found in the spring logs.
I just change spring.datasource.url in application property file to jdbc:h2:file:C:/data/test and run project.
You Can See This video. https://youtu.be/yYWPuM8k8K4
just append this to your application.properties
file.
spring.datasource.url=jdbc:h2:mem:testdb
spring.data.jpa.repositories.bootstrap-mode=default
I had a same problem and I changed the version of Spring Boot to 2.1.3 and it works
I have the same problem with windows. I just change spring.datasource.url in application property file to jdbc:h2:file:C:/data/sample
and run project. after that set JDBC URL to jdbc:h2:file:C:/data/sample
. look like picture
JDBC URL