Openshift中H2数据库的URL
我有一个H2数据库,在openshift中运行。我正试图弄清楚如何使用spring boot应用程序并将其连接到H2容器 在我的spring boot应用程序中,我的Openshift中H2数据库的URL,openshift,h2,Openshift,H2,我有一个H2数据库,在openshift中运行。我正试图弄清楚如何使用spring boot应用程序并将其连接到H2容器 在我的spring boot应用程序中,我的应用程序.properties文件夹中有以下配置: # H2 spring.h2.console.enabled=true spring.h2.console.path=/h2 # Datasource #spring.datasource.url=jdbc:h2:file:~/test spring.datasource.url=
应用程序.properties
文件夹中有以下配置:
# H2
spring.h2.console.enabled=true
spring.h2.console.path=/h2
# Datasource
#spring.datasource.url=jdbc:h2:file:~/test
spring.datasource.url=jdbc:h2:mem:testdb;
spring.datasource.platform=h2
spring.datasource.username=sa
spring.datasource.password=
spring.jpa.hibernate.ddl-auto=none
spring.datasource.continue-on-error=true
spring.datasource.initialization-mode=always
spring.datasource.driver-class-name=org.h2.Driver
spring.profiles.active=h2
我已经为H2和spring应用程序设置了路由和服务。H2的路线为http://database-h2-route-openshift.com
并位于端口1521上。仅将URL放入应用程序.properties
不起作用
spring.datasource.url
我在寻找一个类似的解决方案,你有这个工作吗?你能分享一下你的想法吗?