1.关闭swagger注解 swagger: # 是否开启swagger enabled: false 2. application.yml添加 management: endpoints: enabled-by-default: false 用来关闭监控 application-prod.yml添加 management: endpoints: enabled-by-default: false 用来关闭监控