开发者

RESTful Webservice in Java [duplicate]

This question already has answers here: Closed 11 years ago.

Possible Duplicate:

Easiest frameworks to implement Java REST web services

What is the best way to develop RESTful Web services in Java (JSR 311) ?

  • JERSEY
  • RESTLET framework
  • any other...?

At the moment nnot in future!

UPDATE 1

Are JERSEY and RESTLET both stable a开发者_开发技巧nd complete?


RESTEasy is another JSR-311 implementation and a popular choice.

It's a JBoss product, is comprehensive and mature. It has a wide range of plugins (providers) that help achieve common tasks. It also has a client framework (with caching support out of the box) and other neat extras like EJB and Spring integration.


I've recently used Jersey and found it very easy to use, especially in combination with JAXB. You put some JAXB notations on your beans, some JAX-RS notations on your resource class and then you're almost done already to expose methods in the resource class as RESTful web services. Jersey and JAXB not only support XML, but also JSON - the only thing you need to do is change the MIME type setting and it will automatically generate and parse JSON instead of XML for you.

Jersey has a good user guide and another nice thing is that it has a client API as well as a server API. I've used both, using the Grizzly embedded HTTP server for the server part, which is also very easy to do with Jersey.

Jersey is certainly stable and complete.


Apache CXF or Jersey are both very easy to use and production stable.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜