【问题标题】:Spring Data JPA: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not setSpring Data JPA:未设置“hibernate.dialect”时对 DialectResolutionInfo 的访问不能为空
【发布时间】:2021-01-19 10:29:00
【问题描述】:

我正在尝试使用“spring-boot-starter-data-jpa”访问 SQLite。

并且使用了“application.properties”。 方言设置在“spring.jpa.database-platform”。 但是会出现“DialectResolutionInfo 不能为空”的错误。 我该怎么办?

spring.jpa.database-platform=com.luminous.spring.dialect.SQLDialect
spring.jpa.hibernate.ddl-auto=create

spring.datasource.url=jdbc:sqlite:D:\\employee.db
spring.datasource.driver-class-name=org.sqlite.JDBC
spring.datasource.initialization-mode=always
spring.datasource.username = admin
spring.datasource.password = admin

【问题讨论】:

    标签: spring-boot sqlite spring-data-jpa


    【解决方案1】:

    尝试在 application.properties 文件中添加spring.jpa.hibernate.dialect = org.hibernate.dialect.SQLiteDialect

    另请参阅org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set 了解更多可能的解决方案。

    【讨论】:

      猜你喜欢
      • 2019-07-09
      • 2019-06-22
      • 2015-08-23
      • 2019-01-21
      • 2014-12-20
      • 2014-06-21
      相关资源
      最近更新 更多