简体   繁体   English

Eclipse,删除覆盖错误

[英]Eclipse, remove override error

I have overriden a controller class in a java projects in order to add an interceptor, I would like to know if there is anyway I can remove the "error" showing up in Eclipse: 我已经在Java项目中重写了控制器类以添加拦截器,我想知道是否无论如何我都可以删除Eclipse中显示的“错误”:

The type CRUD is already defined CRUD类型已经定义

I don't think the code will help much but there you go: 我认为代码不会有多大帮助,但是您可以执行以下操作:

package controllers;

    public abstract class CRUD extends Controller {

在窗口->首选项-> Java->编译器->错误/警告中,找到您的案例并从下拉菜单中选择“忽略”

重建eclipse项目后,该错误已消除。

From top of my head: 从我的头顶:

Preferences -> Java -> Compiler -> Errors/Warnings -> Name shadowing and conflicts -> alter the settings there per your likes. 首选项-> Java->编译器->错误/警告->名称阴影和冲突->根据您的喜好更改设置。

The same can be done for a particular project only, by enabling project specific compiler settings in project properties (Java Compiler section). 通过在项目属性(Java编译器部分)中启用项目特定的编译器设置,只能对特定项目执行相同的操作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM