java-spring 错误 Unsupported class file major version 57

Posted INnoVation-V2

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了java-spring 错误 Unsupported class file major version 57相关的知识,希望对你有一定的参考价值。

环境

ubuntu 18.04 jdk13

错误代码

Caused by: org.springframework.core.NestedIOException: ASM ClassReader failed to parse class file - probably due to a new Java class file version that isn‘t supported yet: file ;

nested exception is java.lang.IllegalArgumentException: Unsupported class file major version 57

解决方法

jdk13暂时不被支持,降级至jdk11,可正常运行

降级方法

  • File->Settings->Build,Execution,Deployment->Compiler->Java Compiler->project bytecode version 选择11

  • File->Project Structure->Project->

    • Porject Sdk 选择11

    • Porject language level 选择11

  • File->Project Structure->Modules->language level 选择11

以上是关于java-spring 错误 Unsupported class file major version 57的主要内容,如果未能解决你的问题,请参考以下文章

Java-Spring JDBC初体验

Java-Spring JDBC初体验

java-Spring 管理bean例子

Java-Spring-获取Request,Response对象

java-Spring+MyBatis整合

JAVA-Spring AOP详解