title: Compilation error while running a spring boot application
body: <p>I have a Spring boot application which is not running in intellj and even if this application runs in eclipse I always have to move the "Jre library" in the build path up to the top and then run mvn install.</p>
  
  <p>The entire code can be found at - <a href="https://github.com/iftekharkhan09/SpringCaching.git" rel="nofollow noreferrer">https://github.com/iftekharkhan09/SpringCaching.git</a></p>
  
  <p>Can anyone please help in what is the issue.</p>
  
  <p>Error :-</p>
  
  <pre><code>INFO] -------------------------------------------------------------
  [ERROR] /Git Code/SpringCaching/src/main/java/com/myapp/controller/ContactController.java:[6,46] error: package org.springframework.web.bind.annotation does not exist
  [ERROR] /Git Code/SpringCaching/src/main/java/com/myapp/controller/ContactController.java:[7,46] error: package org.springframework.web.bind.annotation does not exist
  [ERROR] /Git Code/SpringCaching/src/main/java/com/myapp/controller/ContactController.java:[8,46] error: package org.springframework.web.bind.annotation does not exist
  [ERROR] /Git Code/SpringCaching/src/main/java/com/myapp/controller/ContactController.java:[9,46] error: package org.springframework.web.bind.annotation does not exist
  [ERROR] /Git Code/SpringCaching/src/main/java/com/myapp/controller/ContactController.java:[10,46] error: package org.springframework.web.bind.annotation does not exist
  [ERROR] /Git Code/SpringCaching/src/main/java/com/myapp/controller/ContactController.java:[16,1] error: cannot find symbol
  [ERROR]  class RestController
  /Git Code/SpringCaching/src/main/java/com/myapp/controller/ContactController.java:[17,1] error: cannot find symbol
  [ERROR]  class RequestMapping
  /Git Code/SpringCaching/src/main/java/com/myapp/service/impl/ContactServiceImpl.java:[15,31] error: package org.springframework.http does not exist
  [ERROR] /Git Code/SpringCaching/src/main/java/com/myapp/exception/ApiError.java:[6,31] error: package org.springframework.http does not exist
  [ERROR] /Git Code/SpringCaching/src/main/java/com/myapp/exception/ApiError.java:[11,9] error: cannot find symbol
  [ERROR]  class ApiError
  /Git Code/SpringCaching/src/main/java/com/myapp/exception/ApiError.java:[22,17] error: cannot find symbol
  [ERROR]  class ApiError
  /Git Code/SpringCaching/src/main/java/com/myapp/exception/ApiError.java:[27,17] error: cannot find symbol
  [ERROR]  class ApiError
  /Git Code/SpringCaching/src/main/java/com/myapp/exception/ApiError.java:[34,17] error: cannot find symbol
  [ERROR]  class ApiError
  /Git Code/SpringCaching/src/main/java/com/myapp/controller/ContactController.java:[25,2] error: cannot find symbol
  [ERROR]  class ContactController
  /Git Code/SpringCaching/src/main/java/com/myapp/controller/ContactController.java:[31,25] error: cannot find symbol
  [ERROR]  class ContactController
  /Git Code/SpringCaching/src/main/java/com/myapp/controller/ContactController.java:[30,2] error: cannot find symbol
  [ERROR]  class ContactController
  /Git Code/SpringCaching/src/main/java/com/myapp/controller/ContactController.java:[36,26] error: cannot find symbol
  [ERROR]  class ContactController
  /Git Code/SpringCaching/src/main/java/com/myapp/controller/ContactController.java:[35,2] error: cannot find symbol
  [ERROR]  class ContactController
  /Git Code/SpringCaching/src/main/java/com/myapp/controller/ContactController.java:[40,2] error: cannot find symbol
  [ERROR]  class ContactController
  /Git Code/SpringCaching/src/main/java/com/myapp/controller/ContactController.java:[47,28] error: cannot find symbol
  [ERROR]  class ContactController
  /Git Code/SpringCaching/src/main/java/com/myapp/controller/ContactController.java:[46,2] error: cannot find symbol
  [ERROR]  class ContactController
  /Git Code/SpringCaching/src/main/java/com/myapp/controller/ContactController.java:[52,29] error: cannot find symbol
  [ERROR]  class ContactController
  /Git Code/SpringCaching/src/main/java/com/myapp/controller/ContactController.java:[51,2] error: cannot find symbol
  [ERROR]  class ContactController
  /Git Code/SpringCaching/src/main/java/com/myapp/controller/ContactController.java:[57,28] error: cannot find symbol
  [ERROR]  class ContactController
  /Git Code/SpringCaching/src/main/java/com/myapp/controller/ContactController.java:[56,2] error: cannot find symbol
  [ERROR]  class ContactController
  /Git Code/SpringCaching/src/main/java/com/myapp/controller/ContactController.java:[62,28] error: cannot find symbol
  [ERROR]  class ContactController
  /Git Code/SpringCaching/src/main/java/com/myapp/controller/ContactController.java:[61,2] error: cannot find symbol
  [INFO] 27 errors 
  [INFO] -------------------------------------------------------------
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 2.233 s
  [INFO] Finished at: 2017-10-21T19:11:45+05:30
  [INFO] Final Memory: 29M/299M
  [INFO] ------------------------------------------------------------------------
  [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project SpringCaching: Compilation failure: Compilation failure:
  [ERROR] /Git Code/SpringCaching/src/main/java/com/myapp/controller/ContactController.java:[6,46] error: package org.springframework.web.bind.annotation does not exist
  [ERROR] /Git Code/SpringCaching/src/main/java/com/myapp/controller/ContactController.java:[7,46] error: package org.springframework.web.bind.annotation does not exist
  [ERROR] /Git Code/SpringCaching/src/main/java/com/myapp/controller/ContactController.java:[8,46] error: package org.springframework.web.bind.annotation does not exist
  [ERROR] /Git Code/SpringCaching/src/main/java/com/myapp/controller/ContactController.java:[9,46] error: package org.springframework.web.bind.annotation does not exist
  [ERROR] /Git Code/SpringCaching/src/main/java/com/myapp/controller/ContactController.java:[10,46] error: package org.springframework.web.bind.annotation does not exist
  [ERROR] /Git Code/SpringCaching/src/main/java/com/myapp/controller/ContactController.java:[16,1] error: cannot find symbol
  [ERROR] class RestController
  [ERROR] /Git Code/SpringCaching/src/main/java/com/myapp/controller/ContactController.java:[17,1] error: cannot find symbol
  [ERROR] class RequestMapping
  [ERROR] /Git Code/SpringCaching/src/main/java/com/myapp/service/impl/ContactServiceImpl.java:[15,31] error: package org.springframework.http does not exist
  [ERROR] /Git Code/SpringCaching/src/main/java/com/myapp/exception/ApiError.java:[6,31] error: package org.springframework.http does not exist
  [ERROR] /Git Code/SpringCaching/src/main/java/com/myapp/exception/ApiError.java:[11,9] error: cannot find symbol
  [ERROR] class ApiError
  [ERROR] /Git Code/SpringCaching/src/main/java/com/myapp/exception/ApiError.java:[22,17] error: cannot find symbol
  [ERROR] class ApiError
  [ERROR] /Git Code/SpringCaching/src/main/java/com/myapp/exception/ApiError.java:[27,17] error: cannot find symbol
  [ERROR] class ApiError
  [ERROR] /Git Code/SpringCaching/src/main/java/com/myapp/exception/ApiError.java:[34,17] error: cannot find symbol
  [ERROR] class ApiError
  [ERROR] /Git Code/SpringCaching/src/main/java/com/myapp/controller/ContactController.java:[25,2] error: cannot find symbol
  [ERROR] class ContactController
  [ERROR] /Git Code/SpringCaching/src/main/java/com/myapp/controller/ContactController.java:[31,25] error: cannot find symbol
  [ERROR] class ContactController
  [ERROR] /Git Code/SpringCaching/src/main/java/com/myapp/controller/ContactController.java:[30,2] error: cannot find symbol
  [ERROR] class ContactController
  [ERROR] /Git Code/SpringCaching/src/main/java/com/myapp/controller/ContactController.java:[36,26] error: cannot find symbol
  [ERROR] class ContactController
  [ERROR] /Git Code/SpringCaching/src/main/java/com/myapp/controller/ContactController.java:[35,2] error: cannot find symbol
  [ERROR] class ContactController
  [ERROR] /Git Code/SpringCaching/src/main/java/com/myapp/controller/ContactController.java:[40,2] error: cannot find symbol
  [ERROR] class ContactController
  [ERROR] /Git Code/SpringCaching/src/main/java/com/myapp/controller/ContactController.java:[47,28] error: cannot find symbol
  [ERROR] class ContactController
  [ERROR] /Git Code/SpringCaching/src/main/java/com/myapp/controller/ContactController.java:[46,2] error: cannot find symbol
  [ERROR] class ContactController
  [ERROR] /Git Code/SpringCaching/src/main/java/com/myapp/controller/ContactController.java:[52,29] error: cannot find symbol
  [ERROR] class ContactController
  [ERROR] /Git Code/SpringCaching/src/main/java/com/myapp/controller/ContactController.java:[51,2] error: cannot find symbol
  [ERROR] class ContactController
  [ERROR] /Git Code/SpringCaching/src/main/java/com/myapp/controller/ContactController.java:[57,28] error: cannot find symbol
  [ERROR] class ContactController
  [ERROR] /Git Code/SpringCaching/src/main/java/com/myapp/controller/ContactController.java:[56,2] error: cannot find symbol
  [ERROR] class ContactController
  [ERROR] /Git Code/SpringCaching/src/main/java/com/myapp/controller/ContactController.java:[62,28] error: cannot find symbol
  [ERROR] class ContactController
  [ERROR] /Git Code/SpringCaching/src/main/java/com/myapp/controller/ContactController.java:[61,2] error: cannot find symbol
  [ERROR] -&gt; [Help 1]
  [ERROR] 
  [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
  [ERROR] Re-run Maven using the -X switch to enable full debug logging.
  [ERROR] 
  [ERROR] For more information about the errors and possible solutions, please read the following articles:
  [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
  
  Process finished with exit code 1
  </code></pre>
  
  <p>This error happens when I run mvn clean and then man install.</p>