Spring Boot or Jersey with Guice

  • Posted February 2, 2015

I’m writing a RESTful API in Java and would like to know what the benefits of using Spring Boot over Jersey/Guice with an embedded server would be?

I’ll be connecting to a database (MSSQL) and also to other REST applications, additionally will be adding a token-based auth service.


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

I am sure someone has answered this by now or you have found what you’re looking for because it was so long ago but the answer lies in what you’re trying to do. I think using Spring Boot is easier and more feature-rich than Jersey and Guice. If you just need a REST-ful web service with little dependencies then I guess you could use Jersey. Although there is more configuration with the DI container (Guice), setting up your embedded servlet container/HTTP server, and then implementing your data access layer (if there is one). Whereas in the Spring ecosystem I have REST/JSON/XML services built in, a full blown web MVC framework built in, Spring-Data for data access, embedded Tomcat, Jetty, or UnderTow ready to go. Metrics and healthchecks, cloud connectors for remote services and cloud environments. So if it were me I would just go with Spring Boot so that I have the option to add features and have so much set up for me already. Oh yeah, Integration and Batch operations, email out of the box, the list goes on.