title: Cannot access org.springframework.data from my Java Classes
body: <p>I'm working on an online tutorial, and in the step where I need to work with databases and add jpa, I cannot access it in my project.</p>
  
  <p>I have successfully put the dependency in my pom.xml file, and have received no errors. I was also able to access spring jpa through my application.properties file. The problem is that when I wanted to extend CrudRepository, it wasn't being recognized...I then realized that when I went to manually import, it would not import org.springframework.data. </p>
  
  <p>I have maven set to always update snapshots.</p>
  
  <p>Here is my pom.xml file. I apologize for the formatting, but I couldn't get it to all appear on stackoverflow with the correct formatting from intellij:</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;com.example&lt;/groupId&gt;
  &lt;artifactId&gt;demo3&lt;/artifactId&gt;
  &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
  &lt;packaging&gt;jar&lt;/packaging&gt;
  &lt;name&gt;demo3&lt;/name&gt;
  &lt;description&gt;Demo project for Spring Boot&lt;/description&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.0.1.RELEASE&lt;/version&gt;
  &lt;relativePath/&gt;
  &lt;/parent&gt;
  &lt;properties&gt;
  &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
  &lt;project.reporting.outputEncoding&gt;UTF-8&lt;/project.reporting.outputEncoding&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-web&lt;/artifactId&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
  &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
  &lt;artifactId&gt;spring-boot-starter-data-jpa&lt;/artifactId&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
  &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
  &lt;artifactId&gt;mysql-connector-java&lt;/artifactId&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
  &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
  &lt;artifactId&gt;spring-boot-starter-thymeleaf&lt;/artifactId&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;/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;
  </code></pre>
  
  <p>    </p>
  
  <p>And my 'application.properties' file:</p>
  
  <pre><code>spring.datasource.url=***    
  spring.datasource.username=***
  spring.datasource.password=***
  
  spring.jpa.database=MYSQL
  
  spring.jpa.hibernate.ddl-auto = update
  
  spring.jpa.show-sql=false
  
  spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect
  </code></pre>
  
  <p>Cheese class:</p>
  
  <pre><code>package com.example.demo.models;
  
  import javax.persistence.Entity;
  import javax.persistence.GeneratedValue;
  import javax.persistence.Id;
  import javax.validation.constraints.NotNull;
  import javax.validation.constraints.Size;
  
  @Entity
  public class Cheese {
  
      @Id
      @GeneratedValue
      private int id;
  
      @NotNull
      @Size(min=3, max=20)
      private String name;
  
      @NotNull
      @Size(min=1, message = "Description must not be empty")
      private String description;
  
  
      public Cheese(String name, String description) {
          this.name = name;
          this.description = description;
      }
  
      public int getId() {
          return id;
      }
  
      public String getName() {
          return name;
      }
  
      public void setName(String name) {
          this.name = name;
      }
  
      public String getDescription() {
          return description;
      }
  
      public void setDescription(String description) {
          this.description = description;
      }
  }
  </code></pre>
  
  <p>CheeseDao (interface using Spring Data/CrudRepository)</p>
  
  <pre><code>package com.example.demo.models;
  import com.example.demo.models.Cheese;
  
  
  public class CheeseDao extends CrudRepository&lt;Cheese, Integer&gt; {
  }
  </code></pre>