小编cha*_*nya的帖子

H2控制台在H2数据库中抛出webAllowOthers错误

当我尝试使用heruko加载我的h2控制台时,我正在使用heruko来部署我的应用程序它正在抛出一个错误说.

H2控制台很抱歉,此服务器上禁用了远程连接('webAllowOthers').

我在application.properties文件中使用以下设置

jdbc:h2:tcp://localhost/~/test
spring.datasource.platform=h2
spring.datasource.url=jdbc:h2:mem:Roomy;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
spring.datasource.driverClassName=org.h2.Driver
spring.datasource.username=sa
spring.datasource.password=
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
spring.h2.console.enabled = true 
spring.h2.console.settings.trace=true 
spring.h2.console.settings.web-allow-others=true
Run Code Online (Sandbox Code Playgroud)

我做了一些谷歌并添加了.h2.server.properties

#H2 Server Properties
1=Generic H2 (Memory)|org.h2.Driver|jdbc:h2:mem:Roomy;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE|sa
webAllowOthers=true
tcpAllowOthers=true
webPort=8082
webSSL=false
Run Code Online (Sandbox Code Playgroud)

请提一下我做错了什么,我无法查看h2控制台可以有人帮忙.这个cosole工作正常在本地和heroku数据库工作没有问题,但无法查看控制台.任何帮助会非常感激的.

谢谢Chaitanya

java h2 spring-data spring-data-jpa spring-boot

7
推荐指数
3
解决办法
1万
查看次数

标签 统计

h2 ×1

java ×1

spring-boot ×1

spring-data ×1

spring-data-jpa ×1