在屬性文件application.yml中添加 server: port: 8088 本方法適用應(yīng)用中內(nèi)嵌servlet容器的情況。 參考文檔 Spring boot change server port