change port number in sts spring boot code example Example 1: change port number in sts server.port=8081 Example 2: change port in spring boot server.port=8081