Springboot 项目由STS迁移到Intellij的问题

Springboot 项目由STS迁移到Intellij的问题

STS开发的项目在Intellij跑遇到下面问题
Caused by: javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.MappingException: Could not get constructor for org.hibernate.persister.entity.SingleTableEntityPersister

原因:
在STS,项目是用java1.8运行的,在intellij里默认是java11. 由java1.8迁移到java11有些兼容性问题

解决:
在Itellij配置JDK版本
Springboot 项目由STS迁移到Intellij的问题
Springboot 项目由STS迁移到Intellij的问题
Springboot 项目由STS迁移到Intellij的问题
Springboot 项目由STS迁移到Intellij的问题
重新运行项目,问题解决