【发布时间】:2019-04-23 00:38:48
【问题描述】:
我正在使用 SpringBoot api 并使用具有以下属性设置的 H2 数据库。
spring.h2.console.enabled=true
spring.datasource.name=test
spring.datasource.username=sa
spring.datasource.password=
spring.datasource.driver-class-name=org.h2.Driver
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
spring.datasource.initialization-mode = embedded
spring.datasource.url=jdbc:h2:mem:test
spring.jpa.hibernate.ddl-auto = update
当我想使用浏览器通过“http://localhost:8082/h2-console”查看 H2 数据库控制台时,会在浏览器中打开一个带有连接和测试连接按钮的屏幕。当我点击测试连接时,它返回成功,但当我点击连接按钮时,错误出现本地主机拒绝连接。
【问题讨论】:
标签: spring-boot h2