RESTEasy还是Jersey? [英] RESTEasy or Jersey?

查看:232
本文介绍了RESTEasy还是Jersey?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对RESTFul Web服务有要求.由我的团队决定是否选择Jersey或Restlet或RESTEasy或其他.省略其他框架后,我们将无法在RESTEasy和Jersey之间进行选择.

I have a requirement for RESTFul webservices. It is up to my team to decide whether to go with Jersey or Restlet or RESTEasy or anything else. after omitting other frameworks, we are not able to choose between RESTEasy and Jersey.

由于它们似乎几乎是相同的,我们应该考虑什么?

Since both of them seem to be almost the same, what should we consider?

客户端API应该简单而丰富.我们已经在生产中使用JBoss 5.1.

The client API should be simple and rich. We are already using JBoss 5.1 in production.

请让我知道Jersey和RESTEasy的优缺点.除了来自JBoss,我无法在Jersey上找到任何有效的点.

Please let me know the pros and cons of Jersey and RESTEasy. Except that it is from JBoss, I'm not able to find any valid point over Jersey.

推荐答案

Jersey测试框架是泽西岛一个不错的增值功能,它使您可以在JUnit中运行和测试泽西岛REST服务,而无需先部署它们到独立服务器,甚至在将代码提交到存储库之前.

One nice value-add feature of Jersey is the Jersey Test Framework which lets you run and test your Jersey REST services inside JUnit, without the need to first deploy them to a stand-alone server and even before you commit your code to your repo.

这些测试易于编写,您甚至可以在检入Jersey网络服务代码之前运行它们以确保您的服务正常运行,并且它们成为自动测试套件的一部分,有助于强制执行与您的服务签订的合同您的客户.

These tests are easy to write, you can run them before you even check in your Jersey web service code to make sure your service is working, and they become part of your automated test suite which helps enforce the contract your services have with your clients.

请参见文章如果您使用的是Jersety 1.X或此版本(适用于2.x版).

See this article for more information if you're using Jersety 1.X or this one for 2.x.

另一个不错的功能是支持REST MVC模式,这将使您可以从Jersey服务中返回视图,而不仅仅是数据(模型).在这方面,与Jersey测试框架的兼容性仍日趋成熟,但可行.

Another nice feature is support for the REST MVC pattern, which would allow you to return a View from your Jersey services rather than just data (the Model). Compatibility with the Jersey Test Framework is still maturing in this regard, but it is workable.

有关更多信息,请参见本文:

See this article for more information on that:

http://usna86- techbits.blogspot.com/2013/12/jersey-jerseytest-migration-from-1x-to.html

这篇关于RESTEasy还是Jersey?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆