title: The import org.springframework cannot be resolved - Java(268435846)
body: <p>I'm trying to use the Spring Framework in my project, but I have a problem with the import.   I'm working with Gradle for builds, React JS for the front end and Java for the back end.</p>
  
  <p>The weird thing is that I can use classes as RowMapper and JdbcTemplate (I can read and write in my database using these classes) even if VS Code is telling me that my import cannot be resolved.</p>
  
  <p>When I build with Gradle (gradle build then gradle bootrun in my command prompt) it works too.</p>
  
  <p>It's pretty boring working with errors that are not supposed to be present.  Can someone help me ?  </p>
  
  <p>Personally I think it's an error in my build.gradle file or a configuration in my VS Code, but I'm not sure.</p>
  
  <p>Here's my build.gradle with my dependencies and my repositories :</p>
  
  <pre><code>buildscript {
    repositories {
      maven {
        url "https://plugins.gradle.org/m2/"
      }
    }
  
  apply plugin: 'java'
  apply plugin: 'org.liquibase.gradle'
  
  repositories {
  mavenCentral()
  }
  
  dependencies {
  compile("org.springframework.boot:spring-boot-starter:2.0.6.RELEASE")
  
  // Use MySQL Connector-J
  runtime 'mysql:mysql-connector-java:8.0.12'
  
  compile("org.springframework:spring-jdbc:3.2.4.RELEASE")
  
  testCompile('org.junit.jupiter:junit-jupiter-api:5.3.1')
  testRuntime('org.junit.jupiter:junit-jupiter-engine:5.3.1')
  
  compile ('commons-dbcp:commons-dbcp:1.4')
  
  liquibaseRuntime 'org.liquibase:liquibase-core:3.6.1'
  liquibaseRuntime 'org.liquibase:liquibase-groovy-dsl:2.0.1'
  liquibaseRuntime 'mysql:mysql-connector-java:8.0.12'
  }
  </code></pre>
  
  <p>Here's a class of my project where the error occurs :</p>
  
  <pre><code>package be.heh.petclinic.component.pet;
  
  import java.util.List;
  import javax.sql.DataSource;
  import org.springframework.jdbc.core.JdbcTemplate;
  import be.heh.petclinic.domain.Pet;
  
      public class JdbcPetDao {
  
      private DataSource dataSource;
  
      public JdbcPetDao(DataSource dataSource){
          this.dataSource = dataSource;
      }
  
      public List&lt;Pet&gt; getPets() {
          JdbcTemplate select = new JdbcTemplate(dataSource);
          return select.query("SELECT name, birth_date, owner_id, type_id FROM pets", new PetRowMapper());
      }
  
  }
  </code></pre>
  
  <p>org.springframework is underlined and therefore JdbcTemplate as well.</p>