title: Spring Boot can't find main class
body: <p>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.</p>
  
  <p>I've found a relative equivalent question here:
  <a href="https://stackoverflow.com/questions/28451120/spring-boot-program-cannot-find-main-class">Spring Boot Program cannot find main class</a></p>
  
  <p>But the solution doesn't do it for me (I already configured the main class in the pom.xml) like this:</p>
  
  <pre><code>&lt;properties&gt;
      &lt;start-class&gt;de.main.Main&lt;/start-class&gt;
      &lt;java.version&gt;1.8&lt;/java.version&gt;
  &lt;/properties&gt;
  </code></pre>
  
  <p>And this is what my main class looks like:</p>
  
  <pre><code>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);
      }
  }
  </code></pre>
  
  <p>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.</p>
  
  <p>I use Spring Boot version 1.5.2 and eclipse oxygen.</p>
  
  <p>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"</p>
  
  <p>My Project structure is like this:</p>
  
  <pre><code>Project
  |--- Java Resources
  |       |--- src
  |       |     |----de.main
  |       |
  |       |--- WebContent
  |
  |--- pom.xml
  </code></pre>