修改bug
This commit is contained in:
@ -44,7 +44,7 @@
|
||||
<dependency>
|
||||
<groupId>com.github.xiaoymin</groupId>
|
||||
<artifactId>knife4j-openapi3-jakarta-spring-boot-starter</artifactId>
|
||||
<version>4.5.0</version>
|
||||
<version>4.4.0</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@ -110,15 +110,6 @@ public class SpringDocConfig {
|
||||
}
|
||||
PlusPaths newPaths = new PlusPaths();
|
||||
oldPaths.forEach((k, v) -> newPaths.addPathItem(finalContextPath + k, v));
|
||||
newPaths.forEach((s, pathItem) -> {
|
||||
// 为所有接口添加鉴权
|
||||
pathItem.readOperations().forEach(operation -> {
|
||||
operation.addSecurityItem(new SecurityRequirement()
|
||||
.addList(HttpHeaders.AUTHORIZATION)
|
||||
.addList("Clientid")
|
||||
);
|
||||
});
|
||||
});
|
||||
openApi.setPaths(newPaths);
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user