Maven项目提示@Override is not allowed when implement interface method - 云起网

云起网

您现在的位置是:首页> 语言基础 -> Maven项目提示@Override is not allowed when implement interface method

Article

Maven项目提示@Override is not allowed when implement interface method

云起网2019-04-15 语言基础209
这是Maven项目遇到的问题。Intellij IDEA和Eclipse下都会遇到这个问题。




maven类型项目,所以在pox.xml的<build></build>标签中添加如下代码,即可解决问题。

<properties>
        <jdk.version>1.7</jdk.version>
        <!-- 强制编码 -->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>
   ...
<plugins>
    <!-- compiler插件, 设定JDK版本 -->
    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.1</version>
        <configuration>
            <source>${jdk.version}</source>
            <target>${jdk.version}</target>
            <showWarnings>true</showWarnings>
            <encoding>${project.build.sourceEncoding}</encoding>
        </configuration>
    </plugin>
</plugins>


文章评论

共有0条评论来说两句吧...