Eclipse,删除覆盖错误
我已经重写了 java 项目中的控制器类以添加拦截器, 我想知道是否可以删除 Eclipse 中显示的“错误”:
类型 CRUD 已定义
我认为代码不会有太大帮助,但你就可以了:
package controllers;
public abstract class CRUD extends Controller {
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:
The type CRUD is already defined
I don't think the code will help much but there you go:
package controllers;
public abstract class CRUD extends Controller {
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
从窗口 ->首选项-> Java->编译器->错误/警告,找到您的案例并从下拉菜单中选择“忽略”
From Window -> Preferences -> Java -> Compiler -> Errors/Warnings, find your case and choose "Ignore" from the drop down menu
重建 eclipse 项目后,该错误已被删除。
The error was removed after a rebuild of the eclipse project.
从我的头顶开始:
首选项 -> Java->编译器->错误/警告 ->名称隐藏和冲突 ->根据您的喜好更改设置。
通过在项目属性(Java 编译器部分)中启用项目特定的编译器设置,可以仅对特定项目执行相同的操作。
From top of my head:
Preferences -> Java -> Compiler -> Errors/Warnings -> Name shadowing and conflicts -> alter the settings there per your likes.
The same can be done for a particular project only, by enabling project specific compiler settings in project properties (Java Compiler section).