how to find the port that the spring application runs on code example Example 1: change spring port server.port=8081 Example 2: spring port server.port=8081