如何传递包含邮递员中文件的嵌套请求正文

时间:2020-10-16 15:06:04

标签: spring-boot model request postman multipart

我在java spring boot中有两个模型文件,其中一个我声明了数据库变量,另一个我声明了要包含在Request正文中的文件。

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

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

Model with database fields Model nested with file

0 个答案:

没有答案