1. Error
    在这里插入图片描述

    [ERROR] COMPILATION ERROR :
    [INFO] -------------------------------------------------------------
    [ERROR] 不再支持源选项 5。请使用 8 或更高版本。
    [ERROR] 不再支持目标选项 5。请使用 8 或更高版本。
    [INFO] 2 errors
    
  2. Solution 1

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.encoding>UTF-8</maven.compiler.encoding>
        <java-version>1.8</java-version>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
    </properties>
    
  3. Solution 2

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.0</version>
                <configuration>
                    <source>8</source>
                    <target>8</target>
                </configuration>
            </plugin>
        </plugins>
    </build>
    
Logo

技术共进,成长同行——讯飞AI开发者社区

更多推荐