RESTEasy 还是泽西岛? [英] RESTEasy or Jersey?

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

问题描述

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?

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

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.

解决方案

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.

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.

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

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 还是泽西岛?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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