| | |
| | | |
| | | import com.github.xiaoymin.knife4j.spring.annotations.EnableKnife4j; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.BeansException; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.beans.factory.config.BeanPostProcessor; |
| | |
| | | import springfox.documentation.spring.web.plugins.Docket; |
| | | import springfox.documentation.spring.web.plugins.WebFluxRequestHandlerProvider; |
| | | import springfox.documentation.spring.web.plugins.WebMvcRequestHandlerProvider; |
| | | |
| | | import java.lang.reflect.Field; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | |
| | | public Docket docket() { |
| | | Docket docket = new Docket(DocumentationType.OAS_30) |
| | | .apiInfo(apiInfo()) |
| | | .enable("dev".equals(active)) |
| | | .groupName("测试分组") |
| | | .enable(true) |
| | | .select() |
| | | //apis: 添加swagger接口提取范围 |
| | | .apis(RequestHandlerSelectors.withClassAnnotation(Api.class)) |
| | | // .apis(RequestHandlerSelectors.basePackage("com.vincent.rsf.server.manager.controller")) |
| | | .paths(PathSelectors.any()) |
| | | .build(); |
| | | |
| | | return docket; |
| | | } |
| | | |
| | | @Bean |
| | | public Docket erpDocket() { |
| | | Docket docket = new Docket(DocumentationType.OAS_30) |
| | | .apiInfo(apiInfo()) |
| | | .enable("dev".equals(active)) |
| | | .groupName("ERP接口对接") |
| | | .select() |
| | | //apis: 添加swagger接口提取范围 |
| | | .apis(RequestHandlerSelectors.basePackage("com.vincent.rsf.server.api.controller.erp")) |
| | | .apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class)) |
| | | .paths(PathSelectors.any()) |
| | | .build(); |
| | | |
| | | return docket; |
| | | } |
| | | |
| | | |
| | | private ApiInfo apiInfo() { |
| | | return new ApiInfoBuilder() |
| | | .title("WMS标版1.0版本接口文档") |