H2 Database not found error: 90146. H2 database is not created on start

后端 未结 8 1784
无人及你
无人及你 2021-01-19 01:55

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

8条回答
  •  一个人的身影
    2021-01-19 02:46

    If you are using spring boot in order to use h2 DB, make sure you have dependencies on your pom.xml file

    
         org.springframework.boot
         spring-boot-starter-data-jpa
    
    
         com.h2database
         h2
         runtime
    
    

    Your application.yml makes it possible to access h2 DB by URI /h2-console preceded by server URL and to connect to DB named "testdb" with username "sa" and no password, after the application has been started on the server.

提交回复
热议问题