I want to send an object to the controller that has several lists with files and several fields with plain text.
public class ContributionNew
use @ModelAttribute instead of @ResponseBody as this takes up data in key value pairs and the later is used for an object like, json. While hitting the api simply pass the multipart type and json key value pairs of the object. It works fine!
stack overflow question on this