简体   繁体   中英

Developing a Spring REST service with OData interface

I'm developing a RESTful service using the spring framework. This service has a few different controllers. Some of the controllers allow the user to query data from a datastore. On investigating, it seems like OData is a good option when your service wants to perform query operations and would need to support pagination.

Now, my understanding is that a Spring based service can support OData queries by using a OData library such as Olingo. So, could my service have other controllers that do not expose an OData interface? If I had a Spring service with multiple controllers such that some exposed an OData interface and some did not, would that still be considered a well/cleanly designed service?

You can refer this blog about creating a restful services and Olingo Odata service can co-exists together. The Olingo OData services and Spring based rest services can co-exist for implemented together via entitymanager or via normal Database connection, if we you include the respective jar of the given Database. I developed the solution and published blog on that, how Olingo OData and Spring based Rest API co-exists together as mentioned in the blog

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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