'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?
Solution 1:[1]
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
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 |