1. 检查pom.xml

     <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
                <source>1.8</source>
                <target>1.8</target>
                <encoding>utf8</encoding>
            </configuration>
     </plugin>
    

    可以发现,pom.xml中要求的是jdk8,出错的原因就是idea中配置的jdk版本不是8

  2. 安装jdk1.8,过程略

  3. 修改idea中的配置:file–>project structure

Logo

一站式 AI 云服务平台

更多推荐