title: Error: java: package org.springframework.boot does not exist
body: <p>I made a simple application today that gives me a few errors when I run. I made another application very similar to this one yesterday which was working fine but is now broke as well</p>
  
  <p>I am getting these errors:</p>
  
  <pre><code>Error:(4, 32) java: package org.springframework.boot does not exist
  Error:(5, 46) java: package org.springframework.boot.autoconfigure does not exist
  Error:(6, 35) java: package org.springframework.context does not exist
  Error:(9, 2) java: cannot find symbol
    symbol: class SpringBootApplication
  Error:(13, 17) java: cannot find symbol
    symbol:   class ApplicationContext
    location: class com.example.dependencyinjection.DependencyInjectionApplication
  Error:(13, 42) java: cannot find symbol
    symbol:   variable SpringApplication
    location: class com.example.dependencyinjection.DependencyInjectionApplication
  Error:(3, 38) java: package org.springframework.stereotype does not exist
  Error:(5, 2) java: cannot find symbol
    symbol: class Controller
  </code></pre>
  
  <p>Here is my 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 https://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;parent&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
          &lt;version&gt;2.2.7.RELEASE&lt;/version&gt;
          &lt;relativePath/&gt; &lt;!-- lookup parent from repository --&gt;
      &lt;/parent&gt;
      &lt;groupId&gt;com.example&lt;/groupId&gt;
      &lt;artifactId&gt;dependency-injection&lt;/artifactId&gt;
      &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
      &lt;name&gt;dependency-injection&lt;/name&gt;
      &lt;description&gt;Example project for Spring Boot&lt;/description&gt;
  
      &lt;properties&gt;
          &lt;java.version&gt;1.8&lt;/java.version&gt;
      &lt;/properties&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter&lt;/artifactId&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.2.3.RELEASE&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-test&lt;/artifactId&gt;
              &lt;scope&gt;test&lt;/scope&gt;
              &lt;exclusions&gt;
                  &lt;exclusion&gt;
                      &lt;groupId&gt;org.junit.vintage&lt;/groupId&gt;
                      &lt;artifactId&gt;junit-vintage-engine&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
              &lt;/exclusions&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  
  &lt;/project&gt;
  </code></pre>
  
  <p>I have tried:</p>
  
  <ul>
  <li>Reimporting all Maven projects</li>
  <li>Generating sources and updating all folders for all projects</li>
  <li>Creating a new project using Spring initalizer</li>
  <li>Checking settings path for settings.xml</li>
  <li>Deleting the .m2 folder</li>
  <li>Invalidating caches and restarting</li>
  <li>Reopening the project with auto imports on</li>
  <li>Removing/altering VM options for imports</li>
  <li>Forcing Intellij to reread all maven dependencies</li>
  <li>Confirming that the dependencies are in Modules</li>
  <li>Updating Maven repositories</li>
  <li>Many different pom.xml configurations</li>
  <li>Cloning and building a project which is known to work</li>
  <li>Changing Maven's default executable</li>
  <li>Turning auto sync completely off</li>
  <li>Reinstalling Intellij</li>
  </ul>
  
  <p>Any other ideas?</p>