1、问题现象:在实现接口方法时,@Override标签报错,提示错误信息:@Override is not allowed when implementing interface method
2、问题原因:项目java编译版本不对
3、解决方案:
在pom中增加如下配置:
<build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>8</source> <target>8</target> </configuration> </plugin> </plugins> </build>