Spring RESTFul Service POST Data Multi Line String

Spring RESTFul Service POST Data Multi Line String

In this tutorial I will show you how to create Spring MVC RESTFul Service which can process both Post and GET data. For demo purpose we will test Multi line String data and print output on the console. We will be sending response back to the client with message “Success”. Please follow steps below:

  • Create Maven project name: SpringMVCAngularJSService
  • Final project structure:

Spring RESTFul Service POST Data Multi Line String

  • pom.xml

  • web.xml

  • dispatcher-servlet.xml

  • SpringMVCController.java

  • To test this Spring RESTFul service you could use any tools. I will do test with below:
    Postman – REST Client (Postman on Chrome is the most efficient way to test, develop and document APIs) you could add this plug-in chrome.
  • WizTools.org RESTClient 3.4.2 (You could download from here)

 

  • Postman – REST Client Test:

Spring RESTFul Service POST Data Multi Line String

  • WizTools.org RESTClient 3.4.2 Test:

Spring RESTFul Service POST Data Multi Line String

  •  Data process and output on console:

Spring RESTFul Service POST Data Multi Line String

download Download Project: SpringMVCRESTFulService

Leave a Reply

Your email address will not be published. Required fields are marked *