【发布时间】:2014-08-19 23:19:39
【问题描述】:
我正在阅读有关 RestEasy 的教程示例:
http://www.mkyong.com/webservices/jax-rs/resteasy-hello-world-example/
我下载了他们的代码并进行了修改,以便可以将其部署到 tomcat 7 和 java 1.7。
如果我保留网站指定的 pom.xml,
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxrs</artifactId>
<version>2.2.1.GA</version>
</dependency>
然后一切似乎都很好,可以通过以下方式访问:
http://localhost:8080/RESTfulExample/rest/message/hello
但是,如果我将版本级别提高到 3.0.8.Final 或“RELEASE”,
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxrs</artifactId>
<version>3.0.8.Final</version>
</dependency>
然后我无法通过上述 URL 访问它。相反,我在 localhost_access_log.txt 中收到此消息
127.0.0.1 - - [19/Aug/2014:16:02:55 -0700] "GET /RESTfulExample/rest/message/hello HTTP/1.1" 404 -
问题:如果我真的想使用 RESTeasy 3.0.8.Final,有谁知道如何让 pom.xml 工作?我是 Rest 新手。
提前致谢。
【问题讨论】: