Eclipse,删除覆盖错误

发布于 2024-08-17 14:52:29 字数 241 浏览 2 评论 0原文

我已经重写了 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

贵在坚持 2024-08-24 14:52:29

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

From Window -> Preferences -> Java -> Compiler -> Errors/Warnings, find your case and choose "Ignore" from the drop down menu

楠木可依 2024-08-24 14:52:29

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

The error was removed after a rebuild of the eclipse project.

挽手叙旧 2024-08-24 14:52:29

从我的头顶开始:

首选项 -> 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).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文