add 整合 springdoc 移除 knife4j

This commit is contained in:
疯狂的狮子li
2022-07-07 18:08:14 +08:00
parent 48cb0a1bb1
commit 0b07780619
82 changed files with 873 additions and 1014 deletions

View File

@ -2,9 +2,9 @@ package com.ruoyi.demo.controller;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.utils.email.MailUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
@ -20,27 +20,27 @@ import java.io.File;
* @author Michelle.Chung
*/
@Validated
@Api(value = "邮件发送案例", tags = {"邮件发送案例"})
@Tag(name ="邮件发送案例", description = "邮件发送案例")
@RequiredArgsConstructor
@RestController
@RequestMapping("/demo/mail")
public class MailController {
@ApiOperation("发送邮件")
@Operation(summary = "发送邮件")
@GetMapping("/sendSimpleMessage")
public R<Void> sendSimpleMessage(@ApiParam("接收人") String to,
@ApiParam("标题") String subject,
@ApiParam("内容") String text) {
public R<Void> sendSimpleMessage(@Parameter(name = "接收人") String to,
@Parameter(name = "标题") String subject,
@Parameter(name = "内容") String text) {
MailUtils.sendText(to, subject, text);
return R.ok();
}
@ApiOperation("发送邮件(带附件)")
@Operation(summary = "发送邮件(带附件)")
@GetMapping("/sendMessageWithAttachment")
public R<Void> sendMessageWithAttachment(@ApiParam("接收人") String to,
@ApiParam("标题") String subject,
@ApiParam("内容") String text,
@ApiParam("附件路径") String filePath) {
public R<Void> sendMessageWithAttachment(@Parameter(name = "接收人") String to,
@Parameter(name = "标题") String subject,
@Parameter(name = "内容") String text,
@Parameter(name = "附件路径") String filePath) {
MailUtils.sendText(to, subject, text, new File(filePath));
return R.ok();
}