like mentioned in the title I have a Spring Boot project. Trying to start the project out of my IDE it says, that the main class can't be found.
I've found a relative equivalent question here: Spring Boot Program cannot find main class
But the solution doesn't do it for me (I already configured the main class in the pom.xml) like this:
<properties>
<start-class>de.main.Main</start-class>
<java.version>1.8</java.version>
</properties>
And this is what my main class looks like:
package de.main;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;
@SpringBootApplication
public class Main extends SpringBootServletInitializer{
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(Main.class);
}
public static void main(String[] args) {
SpringApplication.run(Main.class, args);
}
}
Additional to this an other project, which uses Spring Boot aswell, works totaly fine. And the pom.xml is configured the same way in both projects.
I use Spring Boot version 1.5.2 and eclipse oxygen.
The errormessage looks like this: "Fehler: Hauptklasse de.main.Main konnte nicht gefunden oder geladen werden" Roughly translated: "Error: main class de.main.Main can't be found or loaded"
My Project structure is like this:
Project
|--- Java Resources
| |--- src
| | |----de.main
| |
| |--- WebContent
|
|--- pom.xml