如何在自定义端口上运行 Spring Boot 应用程序?

答案解析

在 application.properties 或 application.yml 中设置 server.port=自定义端口即可更改默认端口。