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