I/O error while reading input message; nested exception is java.io.IOException: Stream closed

SpringMVC control layer receives multiple front-end parameters
Report an error I/O error while reading input message; nested exception is java.io.IOException: Stream closed
[Controller]

	@PostMapping("/list")
    public Result<List<ReviseInfo>> list(@RequestBody ReviseInfo reviseInfo, @RequestBody ReviseRequest reviseRequest){
        return reviseAdaptor.list(reviseInfo, reviseRequest);
    }

ReviseInfo

@Data
public class ReviseInfo {
    /** Primary key Id */
     @MongoId
     private String id;
     /** Manuscript Id */
     private String subjectId;
     /** Version Id */
     private String versionId;
     /** Suspected error */
     private String fragOri;
     /** Suggested adjustment */
     private String fragFixed;
     /** 1-Unprocessed 2-Ignored 3-Corrected (3 not stored in the library)*/
    private Integer type;
}

ReviseRequest)

@Data
public class ReviseRequest {
	/** Error correction content list */
     private List<ReviseContent> data;
}

Transmission parameter

{
// Current manuscript ID
     "subjectId": "5f4b7a6cc04e43398921421aef8b77a2",
     // Error correction content list
     "data": [
         {
             "content": "Ningxia's good time record plans to investigate"
        }
    ]
}

Error I/O error while reading input message; Needed exception is java.io.ioexception: stream closed
solution
1. Create a new data transmission object, such as revisedto, and merge the required parameters into a dto
[revisedto]

@Data
public class ReviseDTO {
	/** Manuscript Id */
     private String subjectId;
/** Error correction content list */
    private List<ReviseContent> data;
}

[Controller]

	@PostMapping("/list")
    public Result<List<ReviseInfo>> list(@RequestBody ReviseDTO reviseDTO){
        return reviseAdaptor.list(reviseDTO);
    }

2. Use map < String, Object> Receive multiple parameters
[controller]

	@PostMapping("/list")
    public Result<List<ReviseInfo>> list(@RequestBody Map<String, Object> params){
        return reviseAdaptor.list(params);
    }

[Adaptor/serviceImpl]

import org.apache.commons.collections4.MapUtils;

	String subjectId = MapUtils.getString(params, "subjectId");
	List<ReviseContent> data = (List<ReviseInfo>)MapUtils.getObject(params, "data");
	// List<ReviseInfo> data = (List<ReviseInfo>)params.get("data");

Read More: