在配置文件中增加以下配置:
springfox.documentation.enabled=false springfox.documentation.auto-startup=false
配置之后以下swagger相关的URL将无法访问(就达到了解决swagger漏洞的目的):
处理后的效果: