嵌套的异常是org.hibernate.exception.GenericJDBCException:无法获取JDBC连接

时间:2019-04-20 07:40:51

标签: postgresql heroku

无法从部署在heroku上的应用程序连接数据库

已经尝试使用带有密码和用户名的完整网址,然后出现相同的错误

我的application.properties文件

spring.datasource.platform=postgres
spring.datasource.url=jdbc:postgresql://ec2-54-221-236-144.compute-1.amazonaws.com:5432/deh57j1pj37rnn
spring.datasource.username=<USERNAME>
spring.datasource.password=<PASSWORD>
spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect
spring.datasource.driver-class-name=org.postgresql.Driver
spring.jpa.hibernate.ddl-auto=update

但是当我打过邮递员时,我每次都会得到这个

{
    "timestamp": "2019-04-20T07:26:09.418+0000",
    "status": 500,
    "error": "Internal Server Error",
    "message": "nested exception is org.hibernate.exception.GenericJDBCException: Unable to acquire JDBC Connection",
    "path": "/api/bank/getByIFSC"
}

0 个答案:

没有答案