package cn.seecoder.judgement.controller; import cn.seecoder.judgement.dto.StudentAnswerDTO; import cn.seecoder.judgement.service.JudgementService; import cn.seecoder.judgement.response.ResourceResponse; import cn.seecoder.judgement.response.Response; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; /** * author:hr */ @RestController @RequestMapping("api/judgement") public class JudgementController { private final JudgementService judgementService; public JudgementController(JudgementService judgementService){ this.judgementService = judgementService; } @RequestMapping("/submit") public Response submitQuestionsStudentAnswer(@Validated @RequestBody StudentAnswerDTO studentAnswerDTO) { return new ResourceResponse(judgementService.submitQuestionsStudentAnswer(studentAnswerDTO)); } }