java override error

在搭建maven项目时若是项目识别不了 @override java

相似The method *** of type *** must override a superclass method maven

那么多是你的java compiler 版本小于1.6,由于1.6以前的版本不识别@override。 ide

方法一:只须要在pom文件中加上下面的plugin就能够指定项目使用的java 编译版本了。 spa

<plugin>
    <artifactId>maven-compiler-plugin</artifactId>
    <configuration>
     <source>1.6</source>
     <target>1.6</target>
     <encoding>UTF-8</encoding>
    </configuration>
   </plugin> get

 

方法二:手动将window->preferences->java-compiler中的Compiler compliance level修改成6.0。
相关文章
相关标签/搜索