postman에서 api를 테스트하다가 @RequestPart가 붙어 있고 파일을 업로드 하지 않으면 MultipartException: Current request is not a multipart request 이런 에러가 난다.
Validator를 적용하는데 그전에 에러가 나버리니 테스트를 할수가 없었다. 그래서 찾던중에 postman에서 header 부분에 다음과 같이 셋팅을 해주면 위와같은 에러가 나지 않는다.
postman에서 헤더부분을 클릭하고
Key : Content-type
value: Content-Type: multipart/form-data; boundary=----WebKitFormBoundarylTMBUUyXqgLqmAdj
이렇게 셋팅을 하니 오류가 나지않는다.
참조:
https://github.com/postmanlabs/postman-app-support/issues/576
'오류노트' 카테고리의 다른 글
javascript undefined, TypeError (0) | 2022.01.29 |
---|---|
fatal: Not a valid object name: 'master' (0) | 2021.12.28 |
eclipse 2021-06에서 lombok 설치후 에디터 오류 발생시 (0) | 2021.07.27 |
AWS ec2 t3.micro 서버 스프링부트 빌드 오류 error='Cannot allocate memory' (errno=12) (2) | 2021.04.26 |
AWS codedeploy build 오류 (0) | 2021.04.26 |