修改bug

This commit is contained in:
lcj
2025-11-20 18:29:41 +08:00
parent a6c92e8ba9
commit e37d118d0c
5 changed files with 9 additions and 31 deletions

View File

@ -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>

View File

@ -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);
};
}