优化swagger初始化逻辑

This commit is contained in:
smallchill 2024-07-14 11:21:34 +08:00
parent 29ba565bbf
commit f8409d7a31

View File

@ -37,10 +37,16 @@ public class SwaggerLauncherServiceImpl implements LauncherService {
props.setProperty("swagger.enabled", "false");
props.setProperty("knife4j.enable", "false");
props.setProperty("knife4j.production", "true");
props.setProperty("springdoc.api-docs.enabled", "false");
props.setProperty("springdoc.api-usage.enabled", "false");
props.setProperty("springdoc.swagger-ui.enabled", "false");
} else {
props.setProperty("swagger.enabled", "true");
props.setProperty("knife4j.enable", "true");
props.setProperty("knife4j.production", "false");
props.setProperty("springdoc.api-docs.enabled", "true");
props.setProperty("springdoc.api-usage.enabled", "true");
props.setProperty("springdoc.swagger-ui.enabled", "true");
props.setProperty("spring.mvc.pathmatch.matching-strategy", "ANT_PATH_MATCHER");
}
}