1,添加swagger2依赖:
io.springfox springfox-swagger22.7.0 io.springfox springfox-swagger-ui2.7.0
2,新建swagger配置类
主要就注意两点:
1.注解:@Configuration和@EnabledSwagger2
2.Decket对象,里面有个info是主要信息,建造者模式。
3.访问:http://localhost:8080/swagger-ui.html
就酱。

1,添加swagger2依赖:
io.springfox springfox-swagger22.7.0 io.springfox springfox-swagger-ui2.7.0
2,新建swagger配置类
主要就注意两点:
1.注解:@Configuration和@EnabledSwagger2
2.Decket对象,里面有个info是主要信息,建造者模式。
3.访问:http://localhost:8080/swagger-ui.html
就酱。