org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL via JDBC Statement

spring boot 整合hibernate时报错
org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL via JDBC Statement

Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘desc varchar(255)’ at line 1

百度说是改配置,改为org.hibernate.dialect.MySQL5Dialect,我看了下我的配置就是这个,而且不是所有的实体类都报错,于是怀疑是属性中用了关键字导致的,回去改了一下,发现属性用了desc和url,换了个名字,在运行就成功了。

猜你喜欢

转载自blog.csdn.net/wshicainiao/article/details/84851943