在项目的pom.xml增加

<build>
        <finalName>xxxxxxxx</finalName>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
        </plugins>
    </build>

1.8为你的项目java jdk的版本,不匹配就会出现新的错误

相关文章: