swagger2
| http://服务器ip:端口/swagger-ui.html |
| @ApiOperation(value = "apiOperationTest", notes = "apiOperation测试") |
| public void apiOperationSwaggerTest(){ |
| } |
| @ApiImplicitParams({@ApiImplicitParam(name = "id", value = "id", required = true, dataType = "Integer", paramType = "query"),@ApiImplicitParam(name = "name", value = "name", required = true, dataType = "String", paramType = "query")}) |
| public void apiOperationSwaggerTest(Integer id, String name){ |
| } |
| @ApiOperation(value = "apiOperationTest", notes = "apiOperation测试") |
| public void apiOperationTest(@ApiParam(name = "id", value = "1", required = true) Integer id){ |
| } |
| @ApiModel(description = "实体类", value = "实体类") |
| public class City implements Serializable { |
| } |
| @ApiModelProperty(name = "id", value = "编号", required = false, exmaple = "1") |
| private int id; |
| @ApiModelProperty(name = "name", value = "城市名字", dataType = "String", example = "Kabul") |
| private String Name; |
knife4j
| http://localhost:8080/doc.html |
| @ApiOperation("增加学生(json方式提交)") |
| @ApiResponses({@ApiResponse(code = 200, message = "ok", response = DietitianDetailDTO.class)}) |
| @ApiImplicitParam(name = "name", value = "学生姓名", dataTypeClass = String.class, required = true) |
| public R<Student> get(String name) { |
| return R.ok(new Student(new Random().nextLong(), "杜甫", 21, 175)); |
| } |
| |
| @ApiOperation("分页查询") |
| @ApiImplicitParams({@ApiImplicitParam(name="tFoodVO",value="查询条件",dataType = "TFoodVO",required = true),}) |
| public JSONResult pageFood(TFoodInfoVO tFoodVO){ |
| return tFoodService.findPage(tFoodVO); |
| } |
| @ApiModel(value = "学生表单") |
| @ApiModel(value="TFoodInfo对象", description="食材表") |
| @ApiModelProperty(value = "姓名", example = "李白") |
| private String name; |
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
· 字符编码:从基础到乱码解决
· 提示词工程——AI应用必不可少的技术