package com.test.model.request; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import org.springframework.web.multipart.MultipartFile; import java.io.Serializable; import java.util.ArrayList; import java.util.List; @Data public class QuestionRequest { private MultipartFile[] files; private MultipartFile[] answerFiles; }
package com.test.controller; import com.yishu.contest.model.data.Question; import com.yishu.contest.model.request.QuestionRequest; import com.yishu.contest.service.QuestionService; @RestController @RequestMapping("/question") public class QuestionController { private final QuestionService service; public QuestionController(QuestionService service) { this.service = service; } @PostMapping("/save") public void save(QuestionRequest questionRequest) { service.save(questionRequest); } }
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)