Am developing an app using SpringMVC. In that app, I have a list of crud screens(almost 20 screens).
Now, I designed my controller in the following pattern of request mapping
- create
- show
- update
- delete
Here , the problem is, I would like to expose this URL as both REST Service as Well as Normal Spring controller(directs to a new page after CRUD operations).
ie. When I use the application, it should do the CRUD operation and redirect to specific pages(Accordingly)
When I call as a rest service (using REST Clients). I should get the JSON data
Is it possible??