注册

使用JdbcTemplate 和Jpa Hibernate 会提示Cannot determine a dialect/Hibernate.dialect错误

Amo 2024/01/10 874 0

为提高效率,提问时请提供以下信息,问题描述清晰可优先响应。
【DM版本】:DM8
【操作系统】:docker镜像
【CPU】:
【问题描述】*:
maven版本
<dependency>
<groupId>com.dameng</groupId>
<artifactId>DmJdbcDriver18</artifactId>
</dependency>
<dependency>
<groupId>com.dameng</groupId>
<artifactId>DmDialect-for-hibernate6.1</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jdbc</artifactId>
<version>3.1.1</version>
</dependency>
方言配置:
spring:
jpa:
database-platform: org.hibernate.dialect.DmDialect
Error creating bean with name 'jdbcMappingContext' defined in class path resource [org/springframework/boot/autoconfigure/data/jdbc/JdbcRepositoriesAutoConfiguration$SpringBootJdbcConfiguration.class]: Unsatisfied dependency expressed through method 'jdbcMappingContext' parameter 1: Error creating bean with name 'jdbcCustomConversions' defined in class path resource [org/springframework/boot/autoconfigure/data/jdbc/JdbcRepositoriesAutoConfiguration$SpringBootJdbcConfiguration.class]: Failed to instantiate [org.springframework.data.jdbc.core.convert.JdbcCustomConversions]: Factory method 'jdbcCustomConversions' threw exception with message: Error creating bean with name 'jdbcDialect' defined in class path resource [org/springframework/boot/autoconfigure/data/jdbc/JdbcRepositoriesAutoConfiguration$SpringBootJdbcConfiguration.class]: Failed to instantiate [org.springframework.data.relational.core.dialect.Dialect]: Factory method 'jdbcDialect' threw exception with message: Cannot determine a dialect for org.springframework.jdbc.core.JdbcTemplate@2cfc81f8; Please provide a Dialect
--->>

Failed to instantiate [org.springframework.data.relational.core.dialect.Dialect]: Factory method 'jdbcDialect' threw exception with message: Cannot determine a dialect for org.springframework.jdbc.core.JdbcTemplate@2cfc81f8; Please provide a Dialect
--->
Error creating bean with name 'jdbcDialect' defined in class path resource
--->
Failed to instantiate [org.springframework.data.relational.core.dialect.Dialect]: Factory method 'jdbcDialect' threw exception with message: Cannot determine a dialect for org.springframework.jdbc.core.JdbcTemplate@2cfc81f8; Please provide a Dialect
--->
Cannot determine a dialect for org.springframework.jdbc.core.JdbcTemplate@2cfc81f8; Please provide a Dialect
如何解决这个问题

回答 0
暂无回答
扫一扫
联系客服