找不到数据库“ C:/ Users / Suchitra / test”,要么预先创建它,要么允许远程创建数据库

问题描述 投票:0回答:1

pom.xml:

  1. 春季版:

    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.3.0.RELEASE</version>
    
  2. H2版本:

    <groupId>com.h2database</groupId>
    <artifactId>h2</artifactId>
    <scope>runtime</scope>
    

现在:

spring.h2.console.enabled=true.   

仍然,我遇到错误。

link to error screen shot

spring-boot h2
1个回答
0
投票
我尝试了很多解决方案。有人说我需要打开H2-数据库或使用java -jar h2-1.4.199.jar或只是重新启动系统等。但是没有任何帮助。我只需更改下面给出的依赖关系,然后按ctrl+1

忽略警告。然后我在浏览器中签到即http://localhost:8080/h2-console

<dependency> <groupId>com.h2database</groupId> <artifactId>h2</artifactId> <version>1.4.190</version><!--$NO-MVN-MAN-VER$--> </dependency>

© www.soinside.com 2019 - 2024. All rights reserved.