
Knife4j 是一个集Swagger2 和 OpenAPI3 为一体的增强解决方案, 帮助开发者快速聚合使用OpenAPI规范.
立即使用
1. 添加 knife4j 依赖
:::success pig/pig-gateway/pom.xml 添加如下依赖 :::
<!--引入Knife4j的官方ui包--><dependency><groupId>io.springboot</groupId><artifactId>knife4j-openapi3-ui</artifactId><version>3.0.3</version></dependency>
2. 访问swagger-ui页面
访问 [http://pig-gateway:9999/doc.html](http://pig-gateway:9999/doc.html) 打开swagger页面。
:::warning
请求入口必须是 pig-gateway:9999 这种形式, 而不是ip:9999 ,不然跨域。
:::
3. 模拟登陆

填写客户端信息
username: adminpassword: YehdBPevclient_id: testclient_secret : test

