update 使用 StringUtils.SLASH 替代硬编码的斜杠

This commit is contained in:
AprilWind
2026-03-31 09:12:35 +08:00
parent ec9e98096f
commit 11d392fb73
8 changed files with 11 additions and 10 deletions

View File

@@ -110,7 +110,7 @@ public class SpringDocConfig {
public OpenApiCustomizer openApiCustomizer() {
String contextPath = serverProperties.getServlet().getContextPath();
String finalContextPath;
if (StringUtils.isBlank(contextPath) || "/".equals(contextPath)) {
if (StringUtils.isBlank(contextPath) || StringUtils.SLASH.equals(contextPath)) {
finalContextPath = "";
} else {
finalContextPath = contextPath;