在application.yml中加入 eureka: instance: hostname: localhost status-page-url: http://localhost:${server.port}/swagger-ui.html 错误原因: 默认的URL中是这样:http://192.168.137.1:9001/actuator/info我们需要的是:http://localhost:9001/swagger-ui.html