DEV Community

Cover image for Why Spring MVC is best for Creating RESTful Web Services in Java?

Why Spring MVC is best for Creating RESTful Web Services in Java?

javinpaul on May 10, 2019

Disclosure: This post includes affiliate links; I may receive compensation if you purchase products or services from the different links provided i...
Collapse
 
luisdanielmesa profile image
Luis Mesa • Edited

You're a beginner if you don't know the difference between JAX-RS, Jersey and RestEasy... if you use Spring for REST you'll ALWAYS be a beginner. Use the platform, no libraries. JavaEE let's you create a REST endpoint with 1 annotation. Microprofile let's you do patterns easily if you need them (90% of projects don't need circuit-breaker, bulkheads, retries and other popular patterns)

Collapse
 
javinpaul profile image
javinpaul

Microprofile is good but I still see point using Spring MVC for creating RESTful Web Service in Java because you can literally use all your knowledge without spending time and effort to learn a new technology just for REST. If you can its well and good but if you don't have that much time, Spring MVC is better option.

Collapse
 
praveenjasso profile image
praveen jasso

Hi javinpaul could you please explain How to consume and how to produce using soap and restful web services which can be helpful for attending and the interview

Collapse
 
javinpaul profile image
javinpaul

Hello Praveen, noted, I'll write about Spring with SOAP. For REST, I have written a post about How to consume JSON from REStful web services using spring, you may want to check that.

Collapse
 
praveenjasso profile image
praveen jasso

Thanks javin. Consume is easy could you please explain how to produce So that it ll be very helpful for me

Thread Thread
 
javinpaul profile image
javinpaul

yes, it's on my TODO list, stay tuned.

Collapse
 
_hs_ profile image
HS

Take a look at Micronaut. Although Spring was good and main reason I liked it was Spring Boot this new guy may be a bit better for some stuff and yes it's easy to switch it looks like Spring but the annotations are a bit different which is maybe a good thing. And you can use Spring stuff in it.

Collapse
 
javinpaul profile image
javinpaul

Hello @Pablo, yes Eclipse Microprofile seems good, I have also heard some good things about it but yet to deep dive into. Thanks for suggestion anyway.

Collapse
 
jamesrgrinter profile image
James R Grinter

We picked Dropwizard, a simple bit of glue code around the Jetty/Jersey/Jackson libraries and others, and never regretted it.