FISH

20years

Java

work:

Java工程师

Swagger自动生成API文档

“”


在pom.xml里面添加依赖
<dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger2</artifactId> <version>3.0.0</version> </dependency> <dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger-ui</artifactId> <version>3.0.0</version> </dependency> 然后去启动类里面添加注解

@EnableSwagger2

就开启了swagger的能力