解决方案: 查看JDK版本16和pom的版本是否一致,如果不一致直接将pom的版本改为JDK的版本 configuration source 16 source target 16 target configuration将maven-compiler-plugin,指定版本号 3.8.1.(此为当前最高版本)