I am starting to learn microservices with Spring Boot. I go to root of my project and run the command:
mvn spring-boot:run
It works just fine and I can use my endpoints in localhost:8080/[path]. But when I try to run my project from the IDE using Run as -> Spring Boot App. I get this error:
Error: Could not find or load main class
I could just use command line, but I really would like to know why I getting this error with the IDE. So, what I have to do to run my project from the IDE?
Edit 1:
There is my Main Class:
package br.com.leandroborgesferreira.microlearn;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class MicroLearnApplication {
public static void main(String[] args) {
SpringApplication.run(MicroLearnApplication.class, args);
}
}
Any help is appreciated!