什么是swagger

什么是swagger , swagger 用来干什么 。

swagger 的出现是因为前端与后端的需求而存在的。Java 开发分为后端的开发 前端的开发 开发更多的 离不开接口 从而出现了很多的接口测试。Swagger 主要是为了接口测试开发而引用的。
Swagger 主要方便开发 人员开发测试方便而出现的。
首先: Swagger 需要引入jar 包 swagger2 和swagger—ui 都是springfox 下面的。关于jar 可以从mave 仓库现在jar 包。

        <!-- https://mvnrepository.com/artifact/io.springfox/springfox-swagger2 -->
        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger2</artifactId>
            <version>2.9.2</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/io.springfox/springfox-swagger-ui -->
        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger-ui</artifactId>
            <version>2.9.2</version>
        </dependency>

启动springboot 项目就可以 引入依赖就可以访问
http://localhost:8080/swagger-ui.html
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值