使用sprig data jpa,hibernate由实体类自动生成表的时候提示有语法错误
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 ‘ORDER (id integer not null auto_increment, orderName varchar(255), customer_id i’ at line 1
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
生成其他表都可以生成,但就是order表不能生成,后来发现order是mysql的关键字,所以出现了错误,以后应该避免使用mysql的关键字