分类目录

链接

2023 年 2 月
 12345
6789101112
13141516171819
20212223242526
2728  

近期文章

热门标签

新人福利,免费薅羊毛

现在位置:    首页 > JAVA > 正文
swagger隐藏authentication参数
JAVA 暂无评论 阅读(38)
  1. @Bean
  2. public Docket oauthApi() {
  3.     return new Docket(DocumentationType.SWAGGER_2)
  4.         .groupName("oauth")
  5.         .apiInfo(metaData())
  6.         .ignoredParameterTypes(Authentication.class)
  7.         .select()
  8.         .apis(RequestHandlerSelectors.any())
  9.         .paths(PathSelectors.ant("/oauth/**"))
  10.         .build()
  11.         .securitySchemes(Collections.singletonList(securitySchema()))
  12.         .securityContexts(Collections.singletonList(securityContext()));
  13. }

============ 欢迎各位老板打赏~ ===========

本文版权归Bruce's Blog所有,转载引用请完整注明以下信息:
本文作者:Bruce
本文地址:swagger隐藏authentication参数 | Bruce's Blog

发表评论

留言无头像?