【发布时间】:2020-07-16 16:42:53
【问题描述】:
附上的代码是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
【问题讨论】:
-
你的mysql连接器驱动是哪个版本的?
-
在 pom.xml 中更新你的 JDBC 驱动版本
-
我没有带有成绩管理依赖的 pom.xml
-
我使用的是 PostgreSQL 驱动,版本 9。
标签: java postgresql spring-boot web-applications