很奇怪,原本好好的服务,突然启动报错了!!??
不知道为啥,只能先解决问题
报错信息
Caused by: org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set at org.hibernate.engine.jdbc.dialect.internal.DialectFactoryImpl.determineDialect(DialectFactoryImpl.java:100) at org.hibernate.engine.jdbc.dialect.internal.DialectFactoryImpl.buildDialect(DialectFactoryImpl.java:54) at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:137) at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:35) at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:94) at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:263) ... 36 common frames omitted
解决方案
application.properties配置文件中添加:
#使用mysql的 spring.jpa.database-platform=org.hibernate.dialect.MySQLDialect # 这个是pgsql的 # spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect
如果配置配置仍然不生效,建议点击附录中链接,也许能帮助你
附录
https://stackoverflow.com/questions/26548505/org-hibernate-hibernateexception-access-to-dialectresolutioninfo-cannot-be-null