springboot1.X升级到springboot2.0后,项目启动报错:Table 'xxx.hibernate_sequence' doesn't exist

配置文件中增加配置(未测试)

spring.jpa.hibernate.use-new-id-generator-mappings=false 


Entity类中主键注解策略修改为GenerationType.IDENTITY

@GeneratedValue(strategy = GenerationType.IDENTITY)

需要留意的是,如果此类中关联了其他的类,也要一同修改

猜你喜欢

转载自blog.csdn.net/l1h2l3/article/details/86749164
今日推荐