Database not found, and IFEXISTS=true, so we cant auto-create it

后端 未结 17 3006
不思量自难忘°
不思量自难忘° 2020-12-15 06:20

I am getting error after opening the h2 database console. I enter database name but it is showing database not found error:

Database \"C:/Users/Barlek

17条回答
  •  天命终不由人
    2020-12-15 07:07

    Problem:

    Database not found or test folder not in c:/user/username/test

    Copy&paste it in application.properties file:

    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
    

    Issue was of URL, check it. Problem solved.

提交回复
热议问题