RootLogLevelConfigurator has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0
55对应jdk11,61对应jdk17.
查看自己pom文件中java的版本,将版本改为11
setting中版本改为11
project structure中版本改为11
pom中指定springboot版本号,3.1的版本需要jdk17。最后右侧maven 先clean 再install
来源地址:https://blog.csdn.net/weixin_57488856/article/details/131934569