param이 있는 Http 통신 테스트 진행 시 아래 오류 발생
org.springframework.web.multipart.support.MissingServletRequestPartException
호출되는 Http method의 param 값이 없을 경우 테스트 오류 발생하기 때문에 param 값이 안들어 왔을 경우에 대한 속성(required = false) 추가를 해준다.
AS-IS
@PostMapping("/chunk/upload")
public ResponseEntity<String> chunkUpload(@RequestParam(name = "chunk") MultipartFile file,
@RequestParam("chunkNumber") int chunkNumber,
@RequestParam("totalChunks") int totalChunks) throws IOException {
'''
TO-BE
@PostMapping("/chunk/upload")
public ResponseEntity<String> chunkUpload(@RequestParam(name = "chunk", required = false) MultipartFile file,
@RequestParam("chunkNumber") int chunkNumber,
@RequestParam("totalChunks") int totalChunks) throws IOException {
'''