一、swagger2.0使用
1.引入依赖,构造Docket类用于展示,加注解 @EnableSwagger2
2.默认在线文档地址 http://localhost:6050/swagger-ui.html
3.swagger格式文件地址 http://localhost:6050/v2/api-docs
二、swagger大致原理
2.1 将api解析存储到内存
1.通过@EnableSwagger2注解:
1)import了类Swagger2DocumentationConfiguration。
2)Swagger2DocumentationConfiguration实例化了两个类PropertySourcedRequestMappingHa