Swagger只展示部分接口的方式

在配置类中配置如下:

    @Bean
    public Docket createRestApi() {
        return new Docket(DocumentationType.SWAGGER_2)
                .apiInfo(apiInfo())
                .select()
                .apis(RequestHandlerSelectors.basePackage("ai.ii.pinecone.web.controller"))
                .paths(Predicates.or(PathSelectors.ant("/data/ee/aa/**"),
                    PathSelectors.ant("/user/a/**"),
                    PathSelectors.ant("/user/b/**"),
                    PathSelectors.ant("/user/c/**"),
                    PathSelectors.ant("/user/d/**")))
                .build();
    }

你可能感兴趣的:(Swagger只展示部分接口的方式)