无法使用内联内存数据库登录 h2-console

No able to login in h2-console using inline memory database

我在尝试通过内联数据库连接后发现本地主机无法连接,我正在传递正确的用户名password.It工作正常before.Someone否则遇到这个问题?

enter image description here

尝试使用属性文件中的以下配置。

spring.datasource.url=jdbc:h2:mem:home
spring.h2.console.enabled=true
server.port=8082

通过 spring.h2.console.enabled

检查 h2 启用的应用程序启动日志

例如:H2 console available at '/h2-console'. Database available at 'jdbc:h2:mem:home'

打开url:http://localhost:8082/h2-console

验证 jdbc url,并将其更正为属性文件中提到的并显示在日志中。

jdbc:h2:mem:home

测试连接。