Error:java: Target level '1.7' is incompatible with source level '1.8'. A target level '1.8' or bett

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/zianY/article/details/79877476

Error:java: Target level '1.7' is incompatible with source level '1.8'. A target level '1.8' or better is required

第一次使用ideal 项目运行报错 编译级别不对

修改改一下pom文件中的maven插件编译级别,可以通过搜索所有的pom.xml,1.7这个关键词,换成 1.8 就看出来

    <profiles>
        <profile>
            <id>jdk1.7</id>
            <activation>
                <activeByDefault>true</activeByDefault>
                <jdk>1.7</jdk>
            </activation>
            <properties>
                <maven.compiler.source>1.7</maven.compiler.source>
                <maven.compiler.target>1.7</maven.compiler.target>
                <maven.compiler.compilerVersion>1.7</maven.compiler.compilerVersion>
            </properties>
        </profile>
    </profiles>

猜你喜欢

转载自blog.csdn.net/zianY/article/details/79877476