我知道如何禁用swagger for production -我只需要在configuration类中添加注释@Profile("!prod")
public class SwaggerConfig { result of adding annotation但结果是,swagger-ui.html在浏览器中仍然可用,只是它是空的。
我正在尝试文档化和现有的Rest - Spring项目(而不是spring!)。我还可以访问swagger的JSON 我无法访问上的swagger组件。WARN org.springframework.web.servlet.PageNotFound- No mapping found for HTTP request