附加的代码是用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 发布于 2020-07-29 00:04:36
问题是通过更新JDBC驱动程序的版本来解决的,因为JDBC驱动程序应该与本地的PostgreSQL版本同步。
https://stackoverflow.com/questions/62939476
复制相似问题