I am attempting to run my Spring Boot application as a Spring Boot app, but I am consistently receiving a 'port already in use' exception for every port.
I have attempted to change the port in the application.properties file, but the exception continues to appear for every port.
To check listening port you can use below command:
lsof -i -P | grep LISTENnetstat -tuplnnetstat -ab(I'm not a Windows user, so you can reference this url https://www.alphr.com/how-to-check-which-ports-open-windows-10-pc )Choose one port not using.
Then set
server.port=<your-port>in application.properties