나는 휴식의 API는 컨트롤러가 스프링 MVC 빌드가제한 JSON 데이터 요청
@RequestMapping(value = "/test", method = RequestMethod.POST)
public void postTest(@RequestBody FileUpload fileUpload) {
System.out.println(fileUpload.getFilename());
System.out.println(fileUpload.getFiletype());
System.out.println(fileUpload.getFilesize());
}
내 질문에 내 서버가 충돌 질수 있도록 업로드되는 파일의 크기 제한을 넣어 어떻게입니다 1GB의 업로드로 나는 당신의 qustion 보정을 followig하고있는 경우
자바 스크립트에서 파일 크기를 읽고 그곳에서 업로드를 중단하십시오. – Guanxi
그래,하지만 봄이나 바람둥이에서이 구멍을 서버 쪽에서 닫고 싶다. – Vinchenzo
이 질문에 대한 답변입니다. 'Tuning file upload limits' 섹션을보십시오. https://spring.io/guides/gs/uploading-files/ –