开发者社区 问答 正文

阿里Druid URI监控如何去除swagger的访问

image.png

我遇到了这个问题,刚好在开源中国看到,希望能够得到阿里云官方的回复,请查看

展开
收起
因为相信,所以看见。 2020-05-24 22:11:09 489 分享 版权
1 条回答
写回答
取消 提交回答
  • public Docket createRestApi() { return new Docket(DocumentationType.SWAGGER_2) .apiInfo(apiInfo()) .pathMapping("/") .select() // 选择那些路径和api会生成document .apis(RequestHandlerSelectors.any())// 对所有api进行监控 .apis(RequestHandlerSelectors.basePackage("com.test.map_bi.controller")) .build(); }

    2021-02-22 18:03:16
    赞同 展开评论
问答分类:
问答地址: