how to write java REST Web service and Deploy it on heroku? Till now I just worked on simple java application on heroku, first time I am trying to deploy a web service.
Spring MVC's REST support is one option that is pretty easy to use. Or you can use Play Framework's REST support. Or there are many other options. They should virtually all run on Heroku so try a few and see what works for you.
Here's an example of a JAX-RS REST service, complete with Procfile and README for deploying to Heroku (not much to do).
https://github.com/jesperfj/jax-rs-upload-file
It uses Grizzly as embedded server and is super lightweight. Let me know what path you decide to take. Curious about what works best for you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With