首页>代码>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;
}
}

最近下载
最近浏览
