什么 Maven 工件包含 javax.ws.rs.Path?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18139029/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What Maven Artifact Contains javax.ws.rs.Path?
提问by David Williams
I am working through examples in Restful Java with JAX-RS by Bill Burke. I'm using intellij and created a Maven project to make a "Hello World" web service. I understand that JAX-RS is a specification, and not an implementation. I would like to try the Apache CXF implementation.
我正在通过 Bill Burke 使用 JAX-RS 研究 Restful Java 中的示例。我正在使用 intellij 并创建了一个 Maven 项目来制作“Hello World”Web 服务。我知道 JAX-RS 是一个规范,而不是一个实现。我想尝试 Apache CXF 实现。
How do I find out what jar, or what Maven artifact contains the necessary classes to:
我如何找出什么 jar 或什么 Maven 工件包含必要的类:
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.GET;
采纳答案by chrylis -cautiouslyoptimistic-
回答by Zac
g:"javax.ws.rs" AND a:"jsr311-api"
g:"javax.ws.rs" 和 a:"jsr311-api"
回答by Vivek Bansal
Add below lines in pom.xml
在 pom.xml 中添加以下几行
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
<version>2.0</version>
</dependency>