1
I’m following some lessons from a Spring workshop, but I can’t go on because of the mistake: Unable to locate or load main class. Below is the code containing the main function:
package com.algaworks.vinhos;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class OficinaSpringFrameworkApplication {
public static void main(String[] args) {
SpringApplication.run(OficinaSpringFrameworkApplication.class, args);
}
}
Below is the folder structure:
How are you running the project? By Maven? Gradle? IDE? Where is this error being displayed?
– Leonardo Lima
I am running the project through Spring Tool Suite, the error appears in the IDE console. Before compiling a message is displayed warning that the project has errors.
– Guilherme Bartasson
You can include the folder structure of your project?
– Weslley Tavares
Added folder structure in post
– Guilherme Bartasson