override报错,继承自接口的类报错:***must override a superclass method

来源:互联网 发布:潜龙谍影1java 编辑:程序博客网 时间:2024/05/21 17:07

Description   Resource   Path   Location   Type

The methodgetLastSyncTimeByTable(String) of type LogInfoServiceImpl must override asuperclass method LogInfoServiceImpl.java  /YZT-DataTransfer-CHUZHOU-V1.2/src/main/java/com/iflytek/sgy/schedule/service  line 38    JavaProblem        

Description   Resource   Path   Location   Type

The method getName()of type TaskListerner must override a superclass method    TaskListerner.java   /YZT-DataTransfer-CHUZHOU-V1.2/src/main/java/com/iflytek/sgy/schedule/listerner   line 29    JavaProblem

 报错原因:

jdk版本过低,我的是jdk6,不支持override注解。

解决方法:

第一种:直接删掉override注解。

第二种:maven的pom文件中加入如下配置:

<plugin>

              <groupId>org.apache.maven.plugins</groupId>

              <artifactId>maven-compiler-plugin</artifactId>

              <version>2.1</version>

              <configuration>

              <source>1.6</source>

              <target>1.6</target>

              </configuration>

           </plugin>

0 0
原创粉丝点击