AJAX
var commercialName=$("#commercialName").val()
var commerciaPhone=$("#commerciaPhone").val()
var commerciaSite=$("#commerciaSite").val()
console.log(commercialName)
var file=document.getElementById('file').files
var formData=new FormData()
formData.append("file",file[0])
$.ajax({"url":"/systemController/merchantController/contact",
"encType": 'multipart/form-data',
"processData": false,
"contentType":false,
"data":{"file":formData,"commercialName":commercialName,"commerciaPhone":commerciaPhone,
"commerciaSite":commerciaSite},
"type":"post",
"dataType":"json",
"success":...
JAVA
``` @RequestMapping(value = "contact" ,method = RequestMethod.POST)
@ResponseBody
public Dto contact( MultipartFile file,
DbBusinessInformation businessInformation,
HttpServletRequest request)
也找了很多方法,还是没办法解决