Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

REST ful java web service on heroku?

Tags:

java

rest

heroku

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.

like image 903
gaurav Avatar asked Dec 22 '22 06:12

gaurav


2 Answers

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.

like image 179
James Ward Avatar answered Dec 24 '22 02:12

James Ward


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.

like image 45
Jesper J. Avatar answered Dec 24 '22 01:12

Jesper J.