@Override is not allowed when implementing interface method

旧城等待, 2022-05-21 12:07 252阅读 0赞

IDEA导入项目后出现@Override错误,虽然不影响编译,但是看起来不和谐。

Center

对于这个问题,网上有两种解决方案:

1、File—>Project Structure…—>Module—>选中模型—>Language Level,选择6(网上这种方案较多)

Center 1

2、pom文件中配置maven-compiler-plugin(个人认为这种方案更正确,可以避免每个人都要按照解决方案一设置一次)

  1. org.apache.maven.plugins
  2. maven-compiler-plugin
  3. 3.2
  4. 1.6
  5. 1.6

想要更多干货、技术猛料的孩子,快点拿起手机扫码关注我,我在这里等你哦~

70

发表评论

表情:
评论列表 (有 0 条评论,252人围观)

还没有评论,来说两句吧...

相关阅读