首页>代码>spring boot集成swagger knife4j极简入门实例>/springboot-swagger3/src/main/java/com/simon/springbootswagger3/controller/DemoController.java
package com.simon.springbootswagger3.controller;

import com.simon.springbootswagger3.vo.UserVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/demo")
@Api(tags = "用户模块")
public class DemoController {
    @PostMapping("/userList")
    @ApiOperation(value = "查询所有的用户信息")
    public UserVO getUserList() {
        UserVO vo = new UserVO();
        vo.setUserId(123456789);
        vo.setUserName("你好");
        vo.setUserAge(18);
        vo.setPassword("123456");
        vo.setPhone("12345612345");
        vo.setAddress("你好你好你好你好你好你好你好");
        return vo;
    }
}
最近下载更多
最代码官方  LV167 2023年8月12日
最近浏览更多
漫步的海星  LV4 2023年9月26日
茶茶茶百道qq 2023年9月20日
暂无贡献等级
best2018  LV46 2023年9月19日
2036495585  LV9 2023年9月18日
lwllll  LV2 2023年9月15日
sumonian 2023年9月13日
暂无贡献等级
17558420274  LV16 2023年9月10日
CornCat 2023年9月6日
暂无贡献等级
毛毛maomao  LV3 2023年9月5日
sy22006  LV9 2023年9月4日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友