Swagger配置修改

This commit is contained in:
macro
2023-11-23 09:46:32 +08:00
parent 787bef48b0
commit 3a63e17467

View File

@@ -69,7 +69,7 @@ public abstract class BaseSwaggerConfig {
private SecurityContext getContextByPath(String pathRegex) {
return SecurityContext.builder()
.securityReferences(defaultAuth())
.forPaths(PathSelectors.regex(pathRegex))
.operationSelector(oc -> oc.requestMappingPattern().matches(pathRegex))
.build();
}