Swagger快速入门

添加依赖

<dependency>
	<groupId>com.spring4all</groupId>
	<artifactId>swagger-spring-boot-starter</artifactId>
	<version>1.7.0.RELEASE</version>
</dependency>

启动类添加注解

@EnableSwagger2Doc

接口类添加注解

@Api(value = "xavier", description = "the API")

启动测试:http://localhost:8080/swagger-ui.html#

发布了54 篇原创文章 · 获赞 19 · 访问量 5万+

猜你喜欢

转载自blog.csdn.net/DataIntel_XiAn/article/details/102942282