Newsletter

Spring Boot – RESTful Web Service with POST Request in XML Example

Spring-Boot-Tutorials » on May 28, 2018 By Sivateja

In this article I will am going to show you how to read XML data from REST request using Spring Boot. As I told you in the previous articles, spring boot by default support reading and producing the JSON data. But for any XML support we have to include jackson-dataformat-xml dependency.

xml dependency

Final pom.xml

SpringBootRestfulPostXML.java

Customer.java

SpringJava4sController.java

application.properties

Output

Run the application and open http://localhost:8080/spring-boot-restful-post-xml/save-cust-info in Postman.

Request:

Response:

 

You Might Also Like

  ::. About the Author .::

Java4s_Author
- Full Stack Java/J2EE & UI Web Developer
Founder of Java4s - Get It Yourself, A popular Java/J2EE Programming Blog, Love Java and UI frameworks.
You can sign-up for the Email Newsletter for your daily dose of Java tutorials.

Comments

Name*
Mail*
Website



By posting your answer, you agree to our comments policy.
Most Recent Posts from Top Categories
Hibernate Spring Struts
Contact | About Us | Privacy Policy | Advertise With Us

© 2010 - 2018 Java4s - Get It Yourself.
The content is copyrighted to Sivateja Kandula and may not be reproduced on other websites.