nidapeng
2024-04-30 62dc709d73d6653a0c85cf36c398955e95baacdc
server/visits/dmvisit_admin/src/main/java/com/doumee/config/swagger/SwaggerConfig.java
@@ -46,42 +46,18 @@
                .version(version)
                .build();
    }
 /*   @Bean
    public Docket getDocket() {
        return new Docket(DocumentationType.SWAGGER_2)
                .apiInfo(this.getApiInfo()).groupName("【系统管理接口API】")
                .host(host)
                .select()
                .apis( basePackage("com.doumee.api.system;"))
                // 设置需要被扫描的类,这里设置为添加了@Api注解的类
//                .apis(RequestHandlerSelectors.withClassAnnotation(Api.class))
                .paths(PathSelectors.any())
                .build();
    }*/
    @Bean
    public Docket getDocket2() {
    public Docket getDocket() {
        return new Docket(DocumentationType.SWAGGER_2)
                .apiInfo(this.getApiInfo()).groupName("default")
                .host(host)
                .select()
                .apis( basePackage("com.doumee.api.cloud;com.doumee.api.business;com.doumee.api.common"))
                .apis( basePackage("com.doumee.api.cloud,com.doumee.api.common"))
                // 设置需要被扫描的类,这里设置为添加了@Api注解的类
//                .apis(RequestHandlerSelectors.withClassAnnotation(Api.class))
                .paths(PathSelectors.any())
                .build();
    }
   /* @Bean
    public Docket getDocket1() {
        return new Docket(DocumentationType.SWAGGER_2)
            .apiInfo(this.getApiInfo()).groupName("【公共接口API】")
            .host(host)
            .select()
            .apis( basePackage("com.doumee.api.common"))
            // 设置需要被扫描的类,这里设置为添加了@Api注解的类
//                .apis(RequestHandlerSelectors.withClassAnnotation(Api.class))
            .paths(PathSelectors.any())
            .build();
    }*/
    /**
     * 重写basePackage方法,使能够实现多包访问,复制贴上去
     * @author  teavamc