TimeToCodeTheRoad
TimeToCodeTheRoad

Reputation: 7322

RESTful web service

I am implementing a REST service from scratch. I am using Spring + ibatis for the same. Now, spring offers REST support using annotations. However, online, I find many tutorials to integrate Jersey with Spring.
My question: Why would one want to introduce extra dependencies by including another framework, that is Jersey JAX-RS, when Spring itself is good?

Upvotes: 0

Views: 58

Answers (1)

Will
Will

Reputation: 6721

You assume that there's a problem with introducing "another" dependency, which, unless you're developing for some tiny embedded system, there isn't. The added memory footprint, complexity etc would generally be irrelevant.

The decision to use Spring or Jersey for RESTv implementation should be one of personal preference and suitability. Pick the one that satisfies your requirements and you're most comfortable with.

Also, using Spring for REST will require additional dependencies itself. If you're only using Spring for dependency injection, you won't require spring-web or spring-webmvc, whereas these will be required for REST.

Hope this helps

Upvotes: 1

Related Questions