에러 the request doesn't contain a multipart/form-data or multipart/mixed stream
Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.web.multipart.MultipartException: Failed to parse multipart servlet request; nested exception is javax.servlet.ServletException: org.apache.tomcat.util.http.fileupload.impl.InvalidContentTypeException: the request doesn't contain a multipart/form-data or multipart/mixed stream, content type header is application/json] with root cause
org.apache.tomcat.util.http.fileupload.impl.InvalidContentTypeException: the request doesn't contain a multipart/form-data or multipart/mixed stream, content type header is application/json
## 해결책 1
try {
const response = await fetch('/api/reportMail', {
method: 'POST',
body: sendData, // Content-Type을 설정하지 않음
});
if (!response.ok) {
throw new Error('Something went wrong');
}
const result = await response.json();
console.log('Server response:', result);
} catch (error) {
console.error('Error:', error);
}
전송시에 content-type을 따로 명시하지않음
결과 Completed 415 UNSUPPORTED_MEDIA_TYPE -→ 오타로인한것임


