Shifali
Shifali

Reputation: 37

How to integrate Olingo(Odata) in Java SpringBoot Project

Can anyone please help me on how to integrate Olingo (Odata) in a Springboot Java Appln. I'm pretty new to Spring boot and have implemented one project and wanted it to convert to Oling (Odata).

I have gone through various resources but with a bunch of different approaches not sure how to do it the correct way. Please let me know if some has worked on it and can guide me.

link to the project on which I applied spring-boot.

Upvotes: 0

Views: 3203

Answers (1)

Shiva
Shiva

Reputation: 6885

If you are trying to integrate OlingoJPA there are a couple of things you will have to do

  1. Implement JPAServiceFactory and initializeODataJPAContext, basically this is about defining the persistence unit and entity manager
  2. Then you can create a Spring Boot Configuration to mount your OData endpoint and initialize the EntityManagerFactory
  3. Then you can point to your database here
  4. An finally you can define the JPA entities you want your service to expose

The full Spring Boot + JPA project sample is located Github. Feel free to go though it, raise an issue or submit a Pull request for impalements

Upvotes: 1

Related Questions