How To Use Spring RESTTemplate To Post Data to a Web Service by Johnathan Mark Smith

preview_player
Показать описание
How To Use Spring RESTTemplate To Post Data to a Web Service

Java, Spring, RESTTemplate, REST, Web Services

Who is Johnathan Mark Smith: I am the Chief Information Officer & Founder of StutteringTech and SINY-RealEstate and Our Consulting services has over 25 years experience, specializing in business technology in the areas of web application development and collaborative computing. We only use leading technologies such as Android, Springs, JSP's, Servlets, XML, Java, Struts, PHP, LDAP and Web Application Servers. We have a very solid background with Java, OOP, Design-Patterns and Multi-Threading. We also have the able to interface with all levels of management.

Make it a "PRODUCTIVE" day!
#Consultant | #OpenSourceEnthusiast | #Author
twitter: @JohnathanMSmith
Рекомендации по теме
Комментарии
Автор

by the way, to specify converters is not required here. It's because they will set by default. And default constructor in the User class is needed because Jackson create User object at first and then set all properties to it.

dmitrykovalchuk
Автор

I am guessing you need the blank/default constructor because JSON probably has something where it creates a blank object and therefore needs a blank/default constructor.  Since you have an overloaded constructor, a default constructor will not exist/be created unless you explicitly write one.  So without writing a default constructor the JSON breaks whenever it tries to create a blank object.

rickaasen