Commit b3d52ed1 authored by HuangBingGui's avatar HuangBingGui
Browse files

no commit message

parent 8a56c1ad
......@@ -21,17 +21,21 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
@Configuration
@EnableSwagger2
public class Swagger {
@Bean
public Docket createRestApi() {
@Bean("JeeSpring云接口")
public Docket createJeeSpringRestApi() {
return new Docket(DocumentationType.SWAGGER_2)
.groupName("JeeSpring云接口")
.apiInfo(apiInfo())
.select()
//.apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class)) //这里采用包含注解的方式来确定要显示的接口
.apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class)) //这里采用包含注解的方式来确定要显示的接口
//.apis(RequestHandlerSelectors.basePackage("com.jeespring.modules")) //这里采用包扫描的方式来确定要显示的接口
.apis(RequestHandlerSelectors.withClassAnnotation(Api.class))
.paths(PathSelectors.any())
//.apis(RequestHandlerSelectors.withClassAnnotation(Api.class))
//.paths(PathSelectors.regex("/rest/.*"))
//.paths(PathSelectors.any())
.build();
}
private ApiInfo apiInfo() {
return new ApiInfoBuilder()
.title("Swagger2构建RESTful APIs")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment