| | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * Swagger配置类 |
| | | * @author www |
| | | */ |
| | | @Configuration |
| | | @EnableSwagger2 |
| | | @SuppressWarnings("ALL") |
| | | public class SwaggerConfig { |
| | | private List<ApiKey> securitySchemes() { |
| | | List<ApiKey> apiKeys = new ArrayList<ApiKey>(); |
| | |
| | | public Docket createRestApi() { |
| | | return new Docket(DocumentationType.SWAGGER_2) |
| | | .apiInfo(apiInfo()).select() |
| | | .apis(RequestHandlerSelectors.basePackage("com.lf.server.controller")) |
| | | .apis(RequestHandlerSelectors.basePackage("com.moon.server.controller")) |
| | | //.securitySchemes(securitySchemes()) |
| | | //.securityContexts(securityContexts()) |
| | | .paths(PathSelectors.any()).build(); |