Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/postgresql/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/hadoop/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Spring引导与PostgreSql的连接_Java_Postgresql_Spring Boot_Web Applications - Fatal编程技术网

Java Spring引导与PostgreSql的连接

Java Spring引导与PostgreSql的连接,java,postgresql,spring-boot,web-applications,Java,Postgresql,Spring Boot,Web Applications,附加的代码是使用SpringBoot连接数据库时出现的错误,问题是应用程序尝试检查数据库时出现的错误,它在下面说明了错误,SpringBoot使用java版本11,postgre版本使用11,因此版本都是最新的 错误: Caused by: org.postgresql.util.PSQLException: This ResultSet is closed. Caused by: org.hibernate.exception.GenericJDBCException: Unable to o

附加的代码是使用SpringBoot连接数据库时出现的错误,问题是应用程序尝试检查数据库时出现的错误,它在下面说明了错误,SpringBoot使用java版本11,postgre版本使用11,因此版本都是最新的

错误:

Caused by: org.postgresql.util.PSQLException: This ResultSet is closed.
Caused by: org.hibernate.exception.GenericJDBCException: Unable to open JDBC Connection for DDL execution
属性文件:

spring.jpa.database=POSTGRESQL
spring.datasource.platform=org.hibernate.dialect.PostgreSQL9Dialect
spring.datasource.url=jdbc:postgresql://localhost:5432/spring
spring.datasource.username=postgres
spring.datasource.password=123456
spring.jpa.show-sql=true
spring.jpa.generate-ddl=true
spring.jpa.hibernate.ddl-auto=create-drop
spring.datasource.driverClassName=org.postgresql.Driver
spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true 



问题通过更新JDBC驱动程序版本解决,因为JDBC驱动程序应该与本地PostgreSQL版本同步。

问题通过更新JDBC驱动程序版本解决,因为JDBC驱动程序应该与本地PostgreSQL版本同步。

您的mysql连接器驱动程序是什么版本?在pom.xml中更新您的JDBC驱动程序版本我没有pom.xml和等级管理依赖性我使用了版本9的PostgreSQL驱动程序。什么版本是您的mysql连接器驱动程序?在pom.xml中更新您的JDBC驱动程序版本我没有具有等级管理依赖关系的pom.xml使用版本9的PostgreSQL驱动程序。