java Spring 3.0 REST 实现还是 Jersey?

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

Spring 3.0 REST implementation or Jersey?

javaweb-servicesrestspringjax-rs

提问by hnilsen

I'm currently trying to figure out which implementation of JSR-311 I'm going to recommend further up the food chain. I've pretty much narrowed it down to two options - Spring 3.0 with it's native support for REST - or use Sun's own Jersey (Restlets mightalso be an option).

我目前正试图找出我将推荐进一步沿食物链向上执行的 JSR-311 实现。我几乎将其缩小到两个选项 - Spring 3.0 对 REST 的本机支持 - 或使用 Sun 自己的 Jersey(Restlets也可能是一个选项)。

To me it doesn't seem to be much of a difference in the actual syntax, but there might be issues with performance that I haven't figured out yet.

对我来说,实际语法似乎没有太大区别,但可能存在我尚未弄清楚的性能问题。

The service is meant to replace some heavy-duty EJB's and make a RESTful Webservice instead. The load is expected to be rather high, up in the 100k users per day (max) range, but will be seriously load balanced.

该服务旨在取代一些重型 EJB 并生成一个 RESTful Web 服务。预计负载会相当高,达到每天 10 万用户(最大)的范围,但负载平衡会很严重。

Thanks for all your insights.

感谢您的所有见解。

回答by Affe

Spring 3 is not an implementation of JSR-311. Maybe that's enough to answer it for you? If you want JAX-RS on Spring, you'd be using (most likely) Jersey as the provider anyway! I would think if you're already an EJB shop, having everyone learn the Spring MVC way of doing it may not be too useful, if EJB3 is the next step for you?

Spring 3 不是 JSR-311 的实现。也许这足以为您解答?如果您想在 Spring 上使用 JAX-RS,无论如何您都将使用(很可能)Jersey 作为提供程序!我想如果你已经是一个 EJB 商店,让每个人都学习 Spring MVC 的做法可能不会太有用,如果 EJB3 是你的下一步吗?

Here's an article! http://www.infoq.com/articles/springmvc_jsx-rs

这里有一篇文章! http://www.infoq.com/articles/springmvc_jsx-rs

回答by matt b

You might be interested in this InfoQ comparisonof Spring 3.0 MVC and JAX-RS.

您可能对 Spring 3.0 MVC 和 JAX-RS 的InfoQ 比较感兴趣。

It is a bit biased since it is written by "a senior consultant at SpringSource", but I think it's a fair and in-depth comparison of both technologies.

由于它是由“SpringSource的一位高级顾问”撰写的,所以有点偏颇,但我认为这是对两种技术的公平和深入比较。