为resteasy生成javascript
您好,我正在使用 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是的,文档有些缺乏,但是这个 博客宣布发布 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... :)
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/