title: Error creating bean with name "*repository"
body: <p>I have a Maven project. <code>pom.xml</code>:</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
           xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;groupId&gt;root&lt;/groupId&gt;
      &lt;artifactId&gt;CourseWork5&lt;/artifactId&gt;
      &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
      &lt;packaging&gt;jar&lt;/packaging&gt;
  
      &lt;name&gt;coursework&lt;/name&gt;
      &lt;description&gt;&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;1.4.0.RELEASE&lt;/version&gt;
          &lt;relativePath/&gt; &lt;!-- lookup parent from repository --&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-data-jpa&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-security&lt;/artifactId&gt;
          &lt;/dependency&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-thymeleaf&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;mysql&lt;/groupId&gt;
              &lt;artifactId&gt;mysql-connector-java&lt;/artifactId&gt;
              &lt;scope&gt;runtime&lt;/scope&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;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-devtools&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.security&lt;/groupId&gt;
              &lt;artifactId&gt;spring-security-config&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.thymeleaf.extras&lt;/groupId&gt;
              &lt;artifactId&gt;thymeleaf-extras-springsecurity4&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;commons-io&lt;/groupId&gt;
              &lt;artifactId&gt;commons-io&lt;/artifactId&gt;
              &lt;version&gt;2.2&lt;/version&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>Also, I have an entity Address.</p>
  <pre><code>package root.entity;
  import javax.persistence.*;
  
  @Entity
  @Table(name = &quot;Address&quot;)
  public class Address {
     ...
  }
  </code></pre>
  <p>I have repository for this entiry.</p>
  <pre><code>package root.repository;
  import org.springframework.data.jpa.repository.JpaRepository;
  import org.springframework.stereotype.Repository;
  import root.entity.Address;
  
  @Repository
  public interface AddressRepository extends JpaRepository&lt;Address, Integer&gt; {
     ...
  }
  </code></pre>
  <p>And service interface with implementation.</p>
  <pre><code>package root.service.interfaces;
  import root.entity.Address;
  public interface AddressServiceInterface {
      ...
  }
  
  package root.service;
  import org.springframework.beans.factory.annotation.Autowired;
  import org.springframework.stereotype.Service;
  import root.entity.Address;
  import root.repository.AddressRepository;
  import root.service.interfaces.AddressServiceInterface;
  
  @Service
  public class AddressService implements AddressServiceInterface{
      ...
  }
  </code></pre>
  <p>My application.properties file:</p>
  <pre><code>#DB properties:
  db.driver=com.mysql.jdbc.Driver
  db.url=jdbc:mysql://localhost:3306/labsdb?useSSL=false
  db.username=root
  db.password=rootPassword
   
  #Hibernate Configuration:
  db.hibernate.dialect=org.hibernate.dialect.MySQLDialect
  db.hibernate.show_sql=true
  db.entitymanager.packages.to.scan=root.entity
  db.hibernate.hbm2ddl.auto = create
  
  spring.datasource.driverClassName=com.mysql.jdbc.Driver
  spring.datasource.url=jdbc:mysql://localhost:3306/labsdb
  spring.datasource.username=root
  spring.datasource.password=rootPassword
  
  security.require-ssl=false
  </code></pre>
  <p>My start file:</p>
  <pre><code>package root;
  import org.springframework.boot.SpringApplication;
  import org.springframework.boot.autoconfigure.SpringBootApplication;
  @SpringBootApplication
  public class TestApp {
      public static void main(String[] args) {
          SpringApplication.run(TestApp.class, args);
      }
  }
  </code></pre>
  <p>But, after run the application I have errors:</p>
  <pre><code>org.springframework.beans.factory.UnsatisfiedDependencyException:
  Error creating bean with name 'addressController': Unsatisfied
  dependency expressed through field 'service'; nested exception is
  org.springframework.beans.factory.UnsatisfiedDependencyException:
  Error creating bean with name 'addressService': Unsatisfied dependency
  expressed through field 'repository'; nested exception is
  org.springframework.beans.factory.BeanCreationException: Error
  creating bean with name 'addressRepository': Invocation of init method
  failed; nested exception is java.lang.AbstractMethodError:
  org.springframework.data.repository.core.support.RepositoryFactorySupport.getTargetRepository(Lorg/springframework/data/repository/core/RepositoryInformation;)Ljava/lang/Object;
      at
  org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:592)
  ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]     at
  org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
  ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]     at
  org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:370)
  ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]     at
  org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1219)
  ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]     at
  org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:551)
  ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]     at
  org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
  ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]     at
  org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
  ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]     at
  org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
  ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]     at
  org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
  ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]     at
  org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
  ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]     at
  org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:754)
  ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]     at
  org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866)
  ~[spring-context-4.3.4.RELEASE.jar:4.3.4.RELEASE]   at
  org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)
  ~[spring-context-4.3.4.RELEASE.jar:4.3.4.RELEASE]   at
  org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)
  ~[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]  at
  org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759)
  [spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]   at
  org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:369)
  [spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]   at
  org.springframework.boot.SpringApplication.run(SpringApplication.java:313)
  [spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]   at
  org.springframework.boot.SpringApplication.run(SpringApplication.java:1185)
  [spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]   at
  org.springframework.boot.SpringApplication.run(SpringApplication.java:1174)
  [spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]   at
  root.TestApp.main(TestApp.java:10) [classes/:na]    at
  sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  ~[na:1.8.0_65]  at
  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  ~[na:1.8.0_65]  at
  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  ~[na:1.8.0_65]  at java.lang.reflect.Method.invoke(Method.java:497)
  ~[na:1.8.0_65]  at
  org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49)
  [spring-boot-devtools-1.4.0.RELEASE.jar:1.4.0.RELEASE] Caused by:
  org.springframework.beans.factory.UnsatisfiedDependencyException:
  Error creating bean with name 'addressService': Unsatisfied dependency
  expressed through field 'repository'; nested exception is
  org.springframework.beans.factory.BeanCreationException: Error
  creating bean with name 'addressRepository': Invocation of init method
  failed; nested exception is java.lang.AbstractMethodError:
  org.springframework.data.repository.core.support.RepositoryFactorySupport.getTargetRepository(Lorg/springframework/data/repository/core/RepositoryInformation;)Ljava/lang/Object;
      at
  org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:592)
  ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]     at
  org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
  ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]     at
  org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:370)
  ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]     at
  org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1219)
  ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]     at
  org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:551)
  ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]     at
  org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
  ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]     at
  org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
  ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]     at
  org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
  ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]     at
  org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
  ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]     at
  org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
  ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]     at
  org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:207)
  ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]     at
  org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1131)
  ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]     at
  org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1059)
  ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]     at
  org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:589)
  ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]     ... 24 common frames
  omitted Caused by:
  org.springframework.beans.factory.BeanCreationException: Error
  creating bean with name 'addressRepository': Invocation of init method
  failed; nested exception is java.lang.AbstractMethodError:
  org.springframework.data.repository.core.support.RepositoryFactorySupport.getTargetRepository(Lorg/springframework/data/repository/core/RepositoryInformation;)Ljava/lang/Object;
      at
  org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1583)
  ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]     at
  org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
  ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]     at
  org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
  ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]     at
  org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
  ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]     at
  org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
  ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]     at
  org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
  ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]     at
  org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
  ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]     at
  org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:207)
  ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]     at
  org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1131)
  ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]     at
  org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1059)
  ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]     at
  org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:589)
  ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]     ... 37 common frames
  omitted Caused by: java.lang.AbstractMethodError:
  org.springframework.data.repository.core.support.RepositoryFactorySupport.getTargetRepository(Lorg/springframework/data/repository/core/RepositoryInformation;)Ljava/lang/Object;
      at
  org.springframework.data.repository.core.support.RepositoryFactorySupport.getRepository(RepositoryFactorySupport.java:199)
  ~[spring-data-commons-1.12.2.RELEASE.jar:na]    at
  org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.initAndReturn(RepositoryFactoryBeanSupport.java:266)
  ~[spring-data-commons-1.12.2.RELEASE.jar:na]    at
  org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.afterPropertiesSet(RepositoryFactoryBeanSupport.java:252)
  ~[spring-data-commons-1.12.2.RELEASE.jar:na]    at
  org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean.afterPropertiesSet(JpaRepositoryFactoryBean.java:84)
  ~[spring-data-jpa-1.3.3.jar:na]     at
  org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1642)
  ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]     at
  org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1579)
  ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]     ... 47 common frames
  omitted
  </code></pre>
  <p>Please, help me.
  I have a simple app with the same structure and logic, but it works fine. So, I don't know how to fix this issue.</p>