我正在尝试从部署到heroku的docker应用程序连接到我提供的herokupostgres数据库(而不是docker镜像)。当我推送到heroku时,图像构建得很好,但当应用程序启动时,我得到了一个错误。看起来JDBC_DATABASE_URL没有被注入到docker容器中,但我不知道如何让它工作。下面是我的代码:build: web: Do
我已经安装了postgresdocker容器和springboot应用程序作为另一个docker容器。但是Springboot应用程序无法连接到数据库。下面是我的数据库连接代码: # name is used in quartz scheduling initial table creation in db
spring.datasource.name即使使用localhost和127.0.0
我目前正在尝试配置一个spring引导应用程序,以便为两个不同的数据源使用两个不同的坞容器(postgres图像)。为此,我从获取代码并将其复制到一个新项目中。我在注释中调整了包结构,但仍然遇到错误。当调用docker-compose up时,应用程序的启动会在两个postgres容器启动后使用IllegalStateException崩溃。: Bootstrapping Spring Data JPA repositories in DEFAULT mode.
<em
(Launcher.java:87) ~[heroes-app.jar:1.0-SNAPSHOT]
at org.springframework.boot.loader.Launcher.launch它无法连接到停靠的Postgres DB。我从另一个镜像运行了一个测试来ping我的本地机器,并且工作正常。/heroes-app-boot/target/heroes-app-boot-1.0-SNAPSHO