zoukankan      html  css  js  c++  java
  • Swagger配置类

    @Configuration
    @EnableSwagger2
    public class SwaggerConfig {
    
            @Bean
            public Docket webApiConfig(){
                return new Docket(DocumentationType.SWAGGER_2)
                        .groupName("和振斌")
                        .apiInfo(webApiInfo())
                        .select()
                        .paths(Predicates.not(PathSelectors.regex("/admin/.*")))
                        .paths(Predicates.not(PathSelectors.regex("/error.*")))
                        .build();
            }
    
            private ApiInfo webApiInfo(){
                return new ApiInfoBuilder()
                        .title("和振斌··网站-课程中心API文档")
                        .description("本文档描述了课程中心微服务接口定义")
                        .version("1.0")
                        .contact(new Contact("Helen", "", "986125495@qq.com"))
                        .build();
            }
        }
    
    
  • 相关阅读:
    14.3
    14.2
    14.1
    第14章 抽象类和接口
    13.5
    JAVA异常处理
    12.9
    12.7
    vs 常用快捷键
    click()和onclick()的区别
  • 原文地址:https://www.cnblogs.com/HezhenbinGoGo/p/14243223.html
Copyright © 2011-2022 走看看