title: Error when performing "POST" operation in spring?
body: <p>I have sent the data from the angular service class. Here i have sent three parameters <b>letter,documents,empList</b> to the Api for the POST operation</p>
  <pre><code>export class LetterService {
  
    private baseUrl = 'http://localhost:8080/api/letter';
     constructor(private http: HttpClient) { }
  
     saveThree(letter: Object,documents: Object,empList: Object): Observable&lt;Object&gt; {
      return this.http.post(`${this.baseUrl}` + `/create`, {letter,documents,empList});
    }
  </code></pre>
  <p>And on the Spring boot side I used this @RequestBody to map the coming JSON data from service.<b>(You may omit the inside logic of the code as error is another thing)</b> :</p>
  <pre><code>@PostMapping(value = &quot;/letter/create&quot;)
      public String postAllThree(@RequestBody LetterDto letterDto,
              @RequestBody List&lt;Document&gt; document,@RequestBody SelectionCustomOfficeDto selectionCustomOfficeDto) {
          
          
          ClkLetter clkLetter=clkLetterRepository.findById((long)1).get();
          
          Selection selection=selectionRepository.findById((long)letterDto.getSelectionNo()).get();
          
          Assessment assessment=assessmentRepository.findById((long)letterDto.getAssessmentNo()).get();
      
          
          
      Letter letter=letterRepository.save(new Letter(clkLetter,letterDto.getInOut(),letterDto.getInOutNo(),letterDto.getInOutDate(),letterDto.getLetterIssuedSubBy(),letterDto.getLetterFile(),letterDto.getRepresentativeName()
                  ,selection,assessment));
          
       for(Document docume:document)  {
           
           if(docume.isChecked()) {
               letterDocRepository.save(new LetterDoc(letter,docume,&quot;a&quot;));
           }
       }
          
          return  &quot;success&quot;;
      }
  </code></pre>
  <p>The error I am getting is:</p>
  <p><b> [org.springframework.http.converter.HttpMessageNotReadableException: I/O error while reading input message; nested exception is java.io.IOException: Stream closed]</b></p>
  <p>Why am i getting this error ? is the parameter i am sending from angular is not matching or anything wrong in my @Postmapping operation? i saw other articles and questions also but it didn't work .</p>