【发布时间】:2018-07-05 06:48:35
【问题描述】:
我已经添加了这 3 个 maven 依赖项。但是当我尝试使用 @FormDataParam 和 FormDataContentDisposition 时,它会显示红色标记,因为它没有找到。但我可以看到,在多部分库中,我附上了图片以供参考。
<dependencies>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-server</artifactId>
<version>2.27</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet</artifactId>
<version>2.27</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-multipart</artifactId>
<version>2.27</version>
</dependency>
</dependencies>
【问题讨论】:
-
您可能需要刷新您的项目或其他内容。也许关闭日食并重新打开。我不知道,我并没有真正使用 Eclipse。但这绝对是一个 Eclipse 问题。而且您没有导入 FormDataContentDisposition。
-
感谢您的回复。我尝试重新启动 eclipse ..仍然是同样的问题...甚至 (Ctrl + space )auto 建议都没有出现在两个课程中。可能是日食问题
-
您使用哪个 Eclipse 版本?
-
日食氧.3a
-
添加 FormDataContentDisposition 导入,然后尝试从命令行构建它,看看会发生什么。
mvn clean package.
标签: eclipse maven jersey jax-rs