UnsupportedClassVersionError: JWMCFRE003 错误的主要版本;类=io/swagger/v3jaxrs2/integration/OpenApiServlet,offcet=6

问题描述

pom.xml 中的 Swagger 版本

<dependency>
  <groupId>io.swagger.core.v3</groupId>
  <artifactId>swagger-jaxrs2</artifactId>
  <version>2.1.2</version>
</dependency>
<dependency>
  <groupId>io.swagger.core.v3</groupId>
  <artifactId>swagger-jaxrs2-servlet-initializer-v2</artifactId>
  <version>2.1.2</version>
</dependency>

pom.xml 中的属性

<properties>
  <maven.compiler.source>1.6</maven.compiler.source>
  <maven.compiler.target>1.6</maven.compiler.target>
</properties> 

在 Idea 中,设置 - Java 编译器 - 目标字节码版本 - 1.6

我在 Windows 服务器上使用 WebSphere 8.5.5.9。 在本地 WebSphere 上我没有这个问题,只有在服务器上。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)