-
-
Notifications
You must be signed in to change notification settings - Fork 10.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'hibernate.dialect' not set #1065
Comments
这个错是spring boot推断数据库类型失败了,一般是由于数据库地址配置不正确导致的,如果配置的是jdbc:mysql://xxx的话,是能推断出来的。 |
mysql 8.0版本 出现了同样的问题,jdbc串是正确的 |
mysql 8.0需要用最新的master代码,后续会在0.11.0发布支持,详见 #1147 |
0.11.0版本已经发布,详见Release Notes case先关闭了,如还有问题,可以提供更多信息,或进群交流。 |
Caused by: org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set |
看第一个报错信息吧,下面这个不是root cause Caused by: org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set |
以上根本没有解决,原因是因为没有 ApolloPortalDB 数据库: CREATE DATABASE IF NOT EXISTS ApolloPortalDB default charset utf8mb4 COLLATE utf8mb4_general_ci; |
补充一种情况, 错误信息 Caused by: com.mysql.cj.exceptions.InvalidConnectionAttributeException: The server time zone value 'PDT' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support. 只要添加serverTimezone即可 从 spring.datasource.url=jdbc:mysql://localhost:3306/ApolloPortalDB?characterEncoding=utf8 变成 spring.datasource.url=jdbc:mysql://localhost:3306/ApolloPortalDB?characterEncoding=utf8&serverTimezone=UTC 不一定要用UTC |
我在 |
0.10.2版本编译启动会出现Caused by: org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set错误
需要手工配置-Dspring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect
建议框架优化,内部默认配置
The text was updated successfully, but these errors were encountered: