如何在包含文件和嵌套模型的邮递员中发送请求

时间:2020-10-16 15:00:13

标签: spring-boot model request postman multipart

I have two model files in java springboot where in one i have declared the variables for database and another one to include file in Request body itself.[enter image description
here][1]

我有一个控制器来处理请求正文。我如何在邮递员中发送以下请求。有没有更好的方法来包含文件和其他模型类,而不仅仅是将其作为请求参数传递。

public String saveReferenceData(@RequestBody TestClass testClass){
    // custom logic written
    return "done";

0 个答案:

没有答案