整合swagger

1 创建工程
2 引依赖
    <artifactId>spring-boot-starter-web</artifactId>
    <artifactId>springfox-swagger2</artifactId>
3 配置文件
    server.port 8080
4 配置类加
    @EnableSwagger2
5 启动类
6 controller添加swagger注释
7 启动测试
  http://localhost:63080/swagger-ui.html
  http://localhost:63080/doc.html
8 f12及前后端控制台 检查有无报错  

没什么多说的,正在弄github,后续会贴上地址

猜你喜欢

转载自blog.csdn.net/gzi305366853/article/details/129899349
今日推荐