Caused by: org.hibernate.HibernateException: 'hibernate.dialect' not set
来源:3-2 后端框架搭建
noblenooble
2019-03-05
pom.xml 用的 课程github 源码的
application.properties:
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.jdbc-url=jdbc://mysql://127.0.0.1:3306/elastic?charSet=LATIN1
spring.datasource.username=root
spring.datasource.password=password
spring.jpa.show-sql=true
spring.jpa.hibernate.ddl-auto=create
logging.level.org.hibernate.SQL=debug
spring.session.store-type=hash_map
spring.jpa.database-platform=org.hibernate.dialect.MySQLDialect
Caused by: org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when ‘hibernate.dialect’ not set
写回答
4回答
-
酒酿丸子不甜
2020-02-18
这个问题你看下这个文章,我是链接有问题;https://blog.csdn.net/u010372981/article/details/89857112
10 -
诸葛匹夫
2019-04-17
1.@Value("${spring.jpa.database-platform}")
private String databasePlatform;2.jpaVendor.setDatabasePlatform(databasePlatform);
可以先从配置文件中取出值,然后手动设置为HibernateJpaVendorAdapter的属性
10 -
noblenooble
提问者
2019-03-12
解决了版本问题
spring.io 生成的版本是2.1.x 导入老师POM 把spring-boot改成1.5.7 也会出现问题
生成采用1.5.7 问题解决
10 -
慕九州9215102
2019-03-09
如果数据库连接不通也会报这个错
10
相似问题