第一个使用 REST 的 Java EE 项目

发布于 2024-10-06 18:32:51 字数 337 浏览 0 评论 0原文

我已经离开 http://www.oracle.com /technetwork/articles/javase/index-137171.html 并下载了文件,但我有点迷失,因为我以前从未这样做过。

我已经安装了 Tomcat 和 Eclipse Java EE IDE,但我不知道使用什么样的项目来创建 Web 服务以及如何将代码加载和编译到服务。

我是否以正确的方式使用 Eclipse 来解决这个问题?

I've been going off of http://www.oracle.com/technetwork/articles/javase/index-137171.html and downloaded the files but I'm a little lost since I've never done this before.

I've installed Tomcat and Eclipse Java EE IDE but I don't know what kind of project to use to create a webservice and how to load and compile the code to the service.

Am I going about this the right way in using eclipse?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(4

满意归宿 2024-10-13 18:32:51

那篇文章很旧了。从那时起,Java 标准委员会创建了一个名为 JAX-RS 的新 API(REST 对应项)到 JAX-WS)。与 JAX-WS 一样,这旨在标准化 REST Web 服务层。

其参考实现是 Jersey,它支持 JAX-RS 0.8、1.0 和 1.1。

据我了解 Apache CXF 支持 JAX-RS 0.8,但尚不清楚 1.0/1.1 支持。

JBoss 有 RESTEasy。然而,目前尚不清楚 RESTEasy 支持哪些版本的 JAX-RS。

另一个流行的 JAX-RS 框架是 Restlet。不幸的是,我无法从这里打开他们的网站来说明他们支持哪些版本的 JAX-RS。

That article is old. Since then, the Java standards committee created a new API named JAX-RS (The REST counterpart to JAX-WS). Like JAX-WS, this is meant to standardize REST web service layers.

Its reference implementation is Jersey, which supports JAX-RS 0.8, 1.0, and 1.1.

I understand that Apache CXF has support for JAX-RS 0.8, but it is unclear about 1.0/1.1 support.

JBoss has RESTEasy. However, it is not immediately clear which versions of JAX-RS are supported by RESTEasy.

Another popular JAX-RS framework is Restlet. Unfortunately, I can't open their site from here to say which versions of JAX-RS they support.

帅冕 2024-10-13 18:32:51

如果您要创建的只是一个轻量级 RESTful 服务,您还可以查看 GlassFish,它提供了一个简单的 http 服务器休息。

If all you're creating is a lightweight RESTful service you can also look at GlassFish which provides a simple http server for REST.

惜醉颜 2024-10-13 18:32:51

您将创建一个 Web 项目来部署任何类型的 Web 服务。它将打包在 WAR 中并部署在 Tomcat 上。

You'll create a web project to deploy a web service of any kind. It'll be packaged in a WAR and deployed on Tomcat.

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