change port number in spring boot application properties file code example Example: change spring port server.port=8081