一个老项目,突然要改,发现怎么都起不来了
Caused by: java.lang.UnsupportedClassVersionError: org/hibernate/annotations/common/reflection/java/JavaReflectionManager has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
原因:
依赖冲突,hibernate-commons-annotations的版本过高,导致jdk8不支持
解决办法:
指定版本
<dependency>
<groupId>org.hibernate.common</groupId>
<artifactId>hibernate-commons-annotations</artifactId>
<version>5.0.1.Final</version>
</dependency>