0

I was looking to implement RestFul Web Services using Spring so in all Spring Projects list I saw Spring Web Services.

But Strangely it's just for SOAP and no Restful web services!

Where is project for RestFul web Services? Is there any JAX-RS implementation of Restful Web Services? ( Actually, It should be part of Spring Web Services project as its a popular web Services architecture as SOAP itself)

supernova
  • 3,111
  • 4
  • 33
  • 30
  • you can add rest web service in spring project by returning object which will be converted in json by jackson. There does not required any specific project type. Just return object in handler mapping rather than a view. Please look at this: https://spring.io/guides/gs/rest-service/ – shree Jan 07 '18 at 06:00
  • Oddly , Looks like Spring MVC , which is part of Spring Core also includes Restful web servies for Spring! I wonder if its JAX-RS specification compatible! – supernova Jan 07 '18 at 06:08
  • Spring Boot provides the spring-boot-starter-jersey module that allows you to use the JAX-RS programming model for the REST endpoints instead of Spring MVC. It works quite well with Jersey 2.x. For a complete example of creating a web application with Jersey 2.x and Spring Boot 1.4.x, refer to this answer https://stackoverflow.com/a/39912886/1426227. – shree Jan 07 '18 at 06:59

1 Answers1

0

For Creating ReSTful web using spring, two ways are there :

1.One very easy way to use Spring MVC project. Spring provides annotations specificto ReSTful web services if you are using Spring MVC project like @RestController etc.

2.One can also create ReSTful web services by following JAX-RS methodology. Using spring-boot-starter-jersey project. Using this one can get other core functionalities of spring framework like DI, AOP etc.

pandeyd
  • 1
  • 1