Spring boot application define port code example Example 1: spring port server.port=8081 Example 2: change port in spring boot server.port=8081