src/main/java/com/whyc/controller/MailController.java
@@ -11,6 +11,8 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import javax.mail.MessagingException; @RestController @RequestMapping("mail") @Api(tags = "邮件") @@ -21,7 +23,7 @@ @ApiOperation("发送邮件") @PostMapping("sendMail") public Response sendMail(@RequestBody MailDTO mailDTO){ public Response sendMail(@RequestBody MailDTO mailDTO) throws MessagingException { service.sendMail(mailDTO); return new Response().set(1,null,"发送完成"); }