org.springframework.web.HttpMediaTypeNotSupportedException: Content type 'multipart/form-data;boundary=
在使用工具测试(Postman、 swagger )时报如下异常
解决方案:
去掉 @RequestBody 注解就行了
@RequestMapping(value = "/search", method = RequestMethod.POST) public PageResult search(@RequestBody TbBrand brand, int page, int rows){ return brandService.findByPage(brand, page, rows); }