【发布时间】:2017-12-05 15:21:06
【问题描述】:
当我尝试使用 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
我做了一些谷歌并添加了 .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
请提及我做错了什么,我无法查看 h2 控制台,有人可以帮忙解决这个问题吗? .任何帮助都将不胜感激。
谢谢 柴坦尼亚
【问题讨论】:
-
这个问题可能对你有帮助:stackoverflow.com/questions/9838041/…
-
嗨 Josh 感谢您的快速响应,但我需要如何使用命令 java -jar h2*.jar -web -webAllowOthers -tcp -tcpAllowOthers -browser 启动我的服务器。我需要在其中添加任何内容吗?代码或属性文件
-
对于 Spring 应用程序,在 application.properties spring.h2.console.settings.web-allow-others=true 中有以下条目
标签: java spring-boot spring-data spring-data-jpa h2