content-type이 multipart/related 인 요청을 사용해야합니다. 요청은 이미지, json 페이로드 및 바이너리 콘텐츠로 구성됩니다. Spring 부트 애플리케이션에서 이러한 요청을 처리하는 방법에 대한 예제를 찾으려고했지만 multipart/form-data 요청을 처리하는 방법에 대한 참조가 있지만 multipart/related MIME 유형과 관련된 것은 없습니다.스프링 부트 멀티 파트/관련 마임 타입 지원
POST /upload
Content-Type: multipart/related; boundary="123asdf234"
--123asdf234
Content-Type: application/json; charset=UTF-8
Content-Disposition: form-data
{
"json": "payload"
}
—-123asdf234
Content-Type: application/zip
Content-Disposition: file-data; filename="some.zip"; size=123456;
<binary-attachment-content>
—-123asdf234
Content-Type: image/png
Content-Disposition: file-data; filename="image1.png"; size=123456;
<binary-attachment-content>
—-123asdf234-—
사람이 봄 부팅 응용 프로그램에서이 요청을 처리하는 방법을 말해 줄 수 :
요청이 같은 것입니다. JaxRS를 사용하고 있습니다.
Shawn에게 도움을 주셔서 감사합니다. 나는 이것을 시험해보고, 필요하다면 더 많은 도움을 얻기 위해 다시 만날 것이다. 이것은 유망 해 보인다! – Coder