一、Swagger2完整用法
二、Swagger3完整用法
三、Swagger整合Knife4jUi
import com.ikong.model.req.TestReq;
import com.ikong.model.ret.TestRet;
import com.jd.security.framework.common.model.Result;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;public interface TestApi {String test1(@RequestParam(value = "name") String name);@ApiOperation("测试test2")@ApiImplicitParam(name = "name", value = "姓名", required = true)@GetMapping("test1")TestRet test2(@RequestBody TestReq req);Result<TestRet> test3(@RequestBody TestReq req);
}
本文链接:https://my.lmcjl.com/post/2943.html
展开阅读全文
4 评论