Java RESTful Jersey 示例?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4474582/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-30 06:33:45  来源:igfitidea点击:

Java RESTful Jersey Examples?

javarestjersey

提问by mike adams

Are there any examples that demonstrate using Java and Jersey to perform Client<->Server communication? Such as sending XML data to and from each other?

是否有任何示例演示使用 Java 和 Jersey 执行客户端<->服务器通信?比如相互发送 XML 数据?

回答by VessoVit

I would suggest this tutorial from Lars Vogel

我会建议Lars Vogel 的这个教程

It's great place to start with exploring Java Restful, with the use of Tomcat and Jersey. With small remark that not everything there is cohirant- you should try to do some of the work yourself.

这是开始使用 Tomcat 和 Jersey 探索 Java Restful 的好地方。顺便说一句,并非所有内容都是连贯的 - 您应该尝试自己做一些工作。

Furthermore I had trouble myself working with it, but I found this great extension tothe Vogel's tutorial.

此外,我在使用它时遇到了麻烦,但我发现了 Vogel 教程的这个很好的扩展

回答by Duarte Meneses

The one from Lars Vogel already pointed out is great, but I would also recommend you to check this one, published by IBM. Also, the official documentationis full of useful code snipets. This, together with the API reference should be enough to start on it!

Lars Vogel 已经指出的那篇很棒,但我也建议您查看IBM 出版的这一篇。此外,官方文档中充满了有用的代码片段。这个,加上 API 参考应该足以开始了!