title: Spring tutorial accessing-data-jpa does not work
body: <p>I work with Spring but never tried Spring Boot. I wanted to try the accessing-data-jpa tutorial - <a href="https://spring.io/guides/gs/accessing-data-jpa/" rel="nofollow noreferrer">https://spring.io/guides/gs/accessing-data-jpa/</a>. I have cloned the repository from git and run it with Maven as described in the tutorial:
  git clone <a href="https://github.com/spring-guides/gs-accessing-data-jpa.git" rel="nofollow noreferrer">https://github.com/spring-guides/gs-accessing-data-jpa.git</a>
  mvnw spring-boot:run</p>
  
  <p>Running this, I got an error - Caused by: java.lang.ClassNotFoundException: org.springframework.data.repository.CrudRepository</p>
  
  <p>To solve this, I have added a dependency:</p>
  
  <pre><code>&lt;dependency&gt;
              &lt;groupId&gt;org.springframework.data&lt;/groupId&gt;
              &lt;artifactId&gt;spring-data-commons-core&lt;/artifactId&gt;
              &lt;version&gt;1.4.1.RELEASE&lt;/version&gt;
          &lt;/dependency&gt;
  </code></pre>
  
  <p>This helped, however, i got another error:</p>
  
  <pre><code>***************************
  APPLICATION FAILED TO START
  ***************************
  
  Description:
  
  Parameter 0 of method demo in hello.Application required a bean of type 'hello.CustomerRepository' that could not be found.
  
  
  Action:
  
  Consider defining a bean of type 'hello.CustomerRepository' in your configuration.
  
  [WARNING]
  
  java.lang.reflect.InvocationTargetException
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:498)
          at org.springframework.boot.maven.AbstractRunMojo$LaunchRunner.run(AbstractRunMojo.java:527)
          at java.lang.Thread.run(Thread.java:745)
  Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'demo' defined in hello.Application: Unsatisfied dependency expressed through method 'demo' parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'hello.CustomerRepository' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
          at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:749)
          at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:467)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1173)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1067)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)
          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
          at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
          at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
          at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
          at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
          at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761)
          at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866)
          at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)
          at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:737)
          at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:370)
          at org.springframework.boot.SpringApplication.run(SpringApplication.java:314)
          at org.springframework.boot.SpringApplication.run(SpringApplication.java:1162)
          at org.springframework.boot.SpringApplication.run(SpringApplication.java:1151)
          at hello.Application.main(Application.java:17)
          ... 6 more
  Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'hello.CustomerRepository' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
          at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoMatchingBeanFound(DefaultListableBeanFactory.java:1486)
          at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1104)
          at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066)
          at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:835)
          at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:741)
          ... 24 more
  </code></pre>
  
  <p>I am surprised that an official tutorial from Spring does not work. Have you tried this tutorial? Do you have any suggestion why it does not work? Is it broken or is something wrong on my machine? As I know little about Spring Boot I'm not really sure what the problem may be.</p>