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 ‘type=InnoDB’
数据库为mysql5.7,启动项目时自动建表过程中报了如题的错,配置如下:
application.properties配置的方言
spring.jpa.database-platform=org.hibernate.dialect.MySQLDialect
hibernate.properties指定建表所使用的数据库引擎为InnoDB,如不指定默认为MyISAM。
hibernate.dialect.storage_engine=innodb
把方言类MySQLDialect改为MySQL57Dialect即可。