简体   繁体   English

带有JAX-RS和OData的REST服务?

[英]REST service with JAX-RS and OData?

I have been playing with some REST web services which use JAX-RS annotations. 我一直在玩一些使用JAX-RS批注的REST Web服务。 I am now looking at using OData for our query type services. 我现在正在考虑将OData用于我们的查询类型服务。 However, I haven't see any OData examples that uses JAX-RS annotations. 但是,我还没有看到任何使用JAX-RS批注的OData示例。 In fact, OData service examples seem to look very different to JAX-RS services. 实际上,OData服务示例看起来与JAX-RS服务非常不同。

Can OData servcies be annotated with JAX-RS statements? 可以用JAX-RS语句注释OData服务吗? I can't seem to find any examples. 我似乎找不到任何示例。

Thanks 谢谢

Sarah 莎拉

odata4j now (0.6) support Jersey and CXF impl for OData producer. odata4j现在(0.6)支持OData生产者的Jersey和CXF impl。 you can refer to the google code page (list above) for more detail. 您可以参考Google代码页(上面的列表)以了解更多详细信息。

According to the documentation, you can build OData services on top of standards like JAX-RS. 根据文档,您可以在JAX-RS之类的标准之上构建OData服务。

Here's a google code page that lists out the current status and links to the odata4j project. 这是一个Google代码页 ,列出了当前状态并链接到odata4j项目。 There may be some examples there that you can use to build JAX-RS OData services. 那里可能有一些示例可用于构建JAX-RS OData服务。

I'm a .NET developer, so I'm not up on my Java framework capabilities, but hopefully this helps. 我是.NET开发人员,所以我没有掌握Java框架的功能,但希望能有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM