| | |
| | | package com.panzhihua.grid_app.config; |
| | | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import springfox.documentation.builders.ApiInfoBuilder; |
| | | import springfox.documentation.builders.PathSelectors; |
| | | import springfox.documentation.builders.RequestHandlerSelectors; |
| | |
| | | public class SwaggerConfig { |
| | | @Bean |
| | | public Docket createRestApi() { |
| | | return new Docket(DocumentationType.SWAGGER_2) |
| | | .apiInfo(apiInfo()) |
| | | .select() |
| | | .apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class)) |
| | | .paths(PathSelectors.any()) |
| | | .build(); |
| | | return new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()).select() |
| | | .apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class)).paths(PathSelectors.any()).build(); |
| | | } |
| | | |
| | | private ApiInfo apiInfo() { |
| | | return new ApiInfoBuilder() |
| | | .title("网格app管理接口") |
| | | .description("。") |
| | | .contact(new Contact("Ray。", "http://www.ruiyeclub.cn", "ruiyeclub@foxmail.com")) |
| | | .version("1.0") |
| | | .build(); |
| | | return new ApiInfoBuilder().title("网格app管理接口").description("。") |
| | | .contact(new Contact("Ray。", "http://www.ruiyeclub.cn", "ruiyeclub@foxmail.com")).version("1.0").build(); |
| | | } |
| | | } |