问题描述:
java.lang.UnsupportedClassVersionError: com/demo1/Demo1Application 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
问题分析:
1、JDK运行版本为1.8,但是项目配置的JDK版本为11。
解决办法:
第一步,将项目的Project SDK设为1.8,Project language level设为8。

第二步,将模块的Language level设为8。

2、spring-boot-maven-plugin插件版本太高,导致不支持当前jdk版本。
问题分析:
手动指定spring-boot-maven-plugin插件版本即可。
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.1.5.RELEASE</version>
</plugin>版权声明:本文为qq_38974638原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。
https://space.bilibili.com/484264966?spm_id_from=333.337.search-card.all.click