Swagger学习-springboot集成
时间:2021-09-13 19:42:33
收藏:0
阅读:55
创建springboot工程并编写一个hello项目

导包
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.9.2</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>2.9.2</version>
</dependency>
编写SwaggerConfig
@Configuration
@EnableSwagger2 //启动swagger
public class SwaggerConfig {
}
测试:http://localhost:8080/swagger-ui.html

原文:https://www.cnblogs.com/keacua/p/15260244.html
评论(0)