是否是说,由springboot自己处理异常页面跳转,这个就不属于前后端分离是吧?
就是说,要引入JSONResult类,返回给前端,才算前后端分离对吧?
上面有 加群
注意test.html页面中的accept属性,是不是拼错了,或者,想改成一种格式(
accept="image/vnd.sealedmedia.softseal.jpg, image/png"
),上传成功在添加其他的格式,
new file这行代码改为
file.transferTo(new File(new File("D:/temp/") + file.getOriginalFilename()));
就可以的.原因是绝对路径问题,需要再new一下才能创建新文件