为resteasy生成javascript

发布于 2025-01-06 00:21:22 字数 347 浏览 3 评论 0原文

您好,我正在使用 Resteasy 作为项目的 JAX-RS 实现,并且想知道如何从我的 REST 资源生成 ajax 客户端。

我找到了这个链接,但它只是记录了 ajax 客户端及其用法。我在哪里可以找到如何实际生成 javascript。

http://docs.jboss.org /resteasy/docs/2.0.0.GA/userguide/html_single/index.html#d0e3137

Hi there I'm using resteasy as my JAX-RS implementation for a project and was wondering how to generate the ajax client from my REST resources.

I found this link but it just documents the ajax client and its usage. No where can I find how to actually generate the javascript.

http://docs.jboss.org/resteasy/docs/2.0.0.GA/userguide/html_single/index.html#d0e3137

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

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

发布评论

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

评论(2

画尸师 2025-01-13 00:21:22

是的,文档有些缺乏,但是这个 博客宣布发布 2.0 版本的帖子在一定程度上澄清了这一点。

简而言之,您需要部署一个servlet(实际上在用户指南中有描述)。它扫描 JAX-RS 资源并构建 JavaScript 客户端,可以从配置的 URL 下载该客户端。
我还没有尝试过,但这是我从描述中收集到的......:)

Yes, the documentation is somewhat lacking, but the this blog post announcing the release of version 2.0 clarifies it somewhat.

In short, you need to deploy a servlet (actually described in the User Guide). It scans the JAX-RS resources and builds a JavaScript client, which can the be downloaded from the configured URL.
I haven't tried it out, but it is what I gathered from the description... :)

说不完的你爱 2025-01-13 00:21:22

RestEasy jav Script 客户端的工作演示在这里。

我尝试了一下,基本上逻辑是找出带注释的资源,然后从中构建 java 脚本对象。

http://howtodoinjava.com/2013/05/29/resteasy- javascriptajax-client-demo/

A working demo of the RestEasy jav Script client is here..

I tried it out, basically the logic is to find out annotated resources and then build java script objects out of it.

http://howtodoinjava.com/2013/05/29/resteasy-javascriptajax-client-demo/

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