swagger隐藏authentication参数
- @Bean
- public Docket oauthApi() {
- return new Docket(DocumentationType.SWAGGER_2)
- .groupName("oauth")
- .apiInfo(metaData())
- .ignoredParameterTypes(Authentication.class)
- .select()
- .apis(RequestHandlerSelectors.any())
- .paths(PathSelectors.ant("/oauth/**"))
- .build()
- .securitySchemes(Collections.singletonList(securitySchema()))
- .securityContexts(Collections.singletonList(securityContext()));
- }
============ 欢迎各位老板打赏~ ===========
与本文相关的文章
- · springboot使用lock4j实现并发控制
- · springboot全局增加sentinel
- · Springboot整合Swagger常用注解
- · Spring Security 中的自定义PreAuthorize 注解
- · JACKSON和FASTJSON处理返回JSON数据中为NULL字段不显示
- · 将数据从mysql迁移到clickhouse
- · springboot登录失败3次后需要验证码的设计及实现
- · Mybatis —— 解决单引号带来的sql注入问题
- · Springboot整合Nacos(动态改变数据库连接参数)
- · springboot访问静态资源404 —-idea设置问题
- · 不重新打包项目并替换部分jar包
- · 接收企微事件回调 Content type ‘text/xml;charset=UTF-8’ not supported