Sure, here’s the translation: 在内存数据库中使用 Spring Boot

huangapple go评论65阅读模式
英文:

h2 in memory database spring-boot

问题

我开始了一个新的Spring Boot项目。添加了一些启动器(starters),包括jpa、web和h2。在src/main/resources的application.properties文件中,我添加了以下配置:

spring.h2.console.enabled=true
spring.datasource.platform=h2
spring.datasource.url=jdbc:h2:mem:navin

当我尝试连接时,出现了以下错误,请帮忙解决:

Sure, here’s the translation:
在内存数据库中使用 Spring Boot

英文:

I started a new spring-boot.Added some starters
jpa, web, h2.
in src/main/resources application.properties

spring.h2.console.enabled=true
spring.datasource.platform=h2
spring.datasource.url=jdbc:h2:mem:navin

Sure, here’s the translation:
在内存数据库中使用 Spring Boot

When I try to connect shows this error please help

答案1

得分: 2

控制台显示的错误是:数据库"C/Users/aadit/test"未找到

在H2控制台的JDBC URL下,您应该使用在您的application.properties中定义的URL:jdbc:h2:mem:navin

英文:

The error the console is showing is: Database "C/Users/aadit/test" not found.

In the H2 Console under JDBC URL you should be using the url you defined in your application.properties: jdbc:h2:mem:navin

huangapple
  • 本文由 发表于 2020年10月8日 17:58:45
  • 转载请务必保留本文链接:https://go.coder-hub.com/64260145.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定