加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > Java > 正文

java – 无法解析org.eclipse.jdt.annotation.NonNull类型.它是

发布时间:2020-12-15 00:20:58 所属栏目:Java 来源:网络整理
导读:当我使用 Java 8方法引用双冒号运算符(:)与新的运算符(例如MyType :: new)时,我在Spring工具套件(STS)的 Eclipse中得到这个错误: The type org.eclipse.jdt.annotation.NonNull cannot be resolved. It is indirectly referenced from required .class file
当我使用 Java 8方法引用双冒号运算符(:)与新的运算符(例如MyType :: new)时,我在Spring工具套件(STS)的 Eclipse中得到这个错误:

The type org.eclipse.jdt.annotation.NonNull cannot be resolved. It is indirectly referenced from required .class files

如何摆脱这个错误?

解决方法

Stephan Herrmann的评论中提供了错误描述.打开 Eclipse issue打开这个问题更加用户友好.

解决方案是包括以下依赖:

<dependency>
    <groupId>org.eclipse.jdt</groupId>
    <artifactId>org.eclipse.jdt.annotation</artifactId>
    <version>2.0.0</version>
</dependency>

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读