postman 中测试同时支持文件和参数 文件和对象作为参数
今天遇到一个bug
 原本的方法体是这样的
@RequestMapping(value = "/configFileUpload/", method=RequestMethod.GET)
public void modelUpload(@RequestParam MultipartFile addBatchFile, @RequestBody ConfigFile configFile) throws IOException {}
但是一直报错
 后来查了查,是参数的问题
@RequestMapping(value = "/configFileUpload", method=RequestMethod.GET)
public void modelUpload(@RequestPart("file") MultipartFile file, @RequestPart("configFile") ConfigFile configFile) throws IOException {}
改成这样,并且postman 中测试的

然后就测试通过了
 参考
 https://zhuanlan.zhihu.com/p/585706264 









