I am trying to run a Hello World application with Spring Boot on IntelliJ IDEA. I have the following code:
package com.example.springbootexample;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class SpringBootExampleApplication {
public static void main(String[] args) {
SpringApplication.run(SpringBootExampleApplication.class, args);
}
}
After building and running the code I get the following error message:
***************************
APPLICATION FAILED TO START
***************************
Description:
Web server failed to start. Port 8080 was already in use.
Action:
Identify and stop the process that's listening on port 8080 or configure this application to listen on another port.
Process finished with exit code 1
Trying to identify the process that uses the port 8080
I run lsof -i :8080
, but I get a blank output. What could the problem be?