title: Spring Starting throws an exception
body: <p>I'm trying to build the simplest app in spring and I have the following code for my single controller</p>
  
  <pre><code>    package User;
  
  import org.springframework.stereotype.Controller;
  import org.springframework.web.bind.annotation.RequestMapping;
  
  /**
   * Created by Bula on 14/02/14.
   */
  @Controller
  public class UsersController {
  
      @RequestMapping("/user")
      public String index()
      {
          return "user_index";
      }
  
  }
  </code></pre>
  
  <p>Here is the Main.java. The one that boots everything:</p>
  
  <pre><code>  package main;
  
  import javafx.application.Application;
  import org.springframework.boot.SpringApplication;
  import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
  import org.springframework.context.annotation.ComponentScan;
  
  
  @ComponentScan
  @EnableAutoConfiguration
  public class Main {
  
      public static void main(String[] args) {
          SpringApplication.run(Application.class, args);
      }
  }
  </code></pre>
  
  <p>Also this is the pom.xml</p>
  
  <pre><code>  &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;groupId&gt;blog&lt;/groupId&gt;
      &lt;artifactId&gt;blog&lt;/artifactId&gt;
      &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring&lt;/artifactId&gt;
              &lt;version&gt;2.5.6&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-web&lt;/artifactId&gt;
              &lt;version&gt;4.0.0.RELEASE&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-autoconfigure&lt;/artifactId&gt;
              &lt;version&gt;1.0.0.BUILD-SNAPSHOT&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot&lt;/artifactId&gt;
              &lt;version&gt;1.0.0.BUILD-SNAPSHOT&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  
  
  &lt;/project&gt;
  </code></pre>
  
  <p>I have updated the maven hence all the libraries technically should be there. Here is the error that gets thrown(I tried googling it but nothing showed up which came any close to what I faced ):</p>
  
  <pre><code>    Exception in thread "main" java.lang.NoSuchMethodError: org.springframework.core.annotation.AnnotationAwareOrderComparator.sort(Ljava/util/List;)V
      at org.springframework.boot.SpringApplication.getSpringFactoriesInstances(SpringApplication.java:371)
      at org.springframework.boot.SpringApplication.getSpringFactoriesInstances(SpringApplication.java:343)
      at org.springframework.boot.SpringApplication.initialize(SpringApplication.java:221)
      at org.springframework.boot.SpringApplication.&lt;init&gt;(SpringApplication.java:197)
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:877)
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:866)
      at main.Main.main(Main.java:14)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
  
  Process finished with exit code 1
  </code></pre>
  
  <p>My user_index.html does exist however I don't think the error is in any kind linked with it since it only has a html tag.
  Here is an image with all the libraries that I have:
  <img src="https://i.stack.imgur.com/tmVvX.png" alt="enter image description here"></p>