7

Is there a way to generate spring rest crontroller for a business flow.
I want to generate CRUD services for given database object.
For example, "employee_mst" , generate CRUD services code automatically.
This is similar to what we used to have in hibernate or what we have in loopback.io for node.
Appreciate any help around it.

Allzhere
  • 1,280
  • 1
  • 11
  • 19

1 Answers1

6

I found a link that may answer your question: https://docs.spring.io/spring-data/rest/docs/current/reference/html/.

This text explains that Spring Data REST generates REST interfaces from Spring Data repositories.

I intend to try this but did not do so yet.

EDIT: I saw in my example application that Spring Data REST did what I expected. I could request all entities in my Spring Data repository using a HTTP request. The returned JSON contained also discovery information. You may prefer writing your own controller to have more control on what information is returned.

Martijn Dirkse
  • 543
  • 7
  • 16