change tomcat port in spring boot application code example Example: change spring port server.port=8081