title: Spring: Can't load the application context. NoSuchBeanDefinitionException
body: <p>i hope anybody might had a solution for this.
  I implemented a simple test to check if the application context starts correctly, but all i get is an NoSuchBeanDefinition Exception.</p>
  
  <p>So i had a closer look to the ctx-*.xml files. Sadly i had found nothing.</p>
  
  <p>thx in advance</p>
  
  <p><strong><em>The test preparation:</em></strong></p>
  
  <pre><code>package de.backend.services;
  import static org.junit.Assert.fail;
  
  import org.junit.Ignore;
  import org.junit.Test;
  import org.junit.runner.RunWith;
  import org.springframework.beans.factory.annotation.Autowired;
  import org.springframework.test.context.ContextConfiguration;
  import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
  
  import de.garfield.backend.persistence.services.interfaces.OCHEntryService;
  
  @RunWith(SpringJUnit4ClassRunner.class)
  @ContextConfiguration(locations = {"/META-INF/spring/ctx-backend.xml"})
  public class OCHEntryServiceImplTest {
  
      @Autowired
      private OCHEntryService ochEntryService;
  
      /** Tests if the application context could be loaded. **/
      @Test
      public void loadApplicationContext() {
          ochEntryService.findAll();
      }
  }
  </code></pre>
  
  <p><strong><em>The exception:</em></strong></p>
  
  <pre><code>2014-12-23 22:02:53,340 [main] ERROR org.springframework.test.context.TestContextManager  - Caught exception while allowing TestExecutionListener [org.springframework.test.context.support.DependencyInjectionTestExecutionListener@5093acc2] to prepare test instance [de.backend.services.OCHEntryServiceImplTest@67591ba4]
  java.lang.IllegalStateException: Failed to load ApplicationContext
      at org.springframework.test.context.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:94)
      at org.springframework.test.context.DefaultTestContext.getApplicationContext(DefaultTestContext.java:72)
      at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:117)
      at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:83)
      at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:212)
      at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:200)
      at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:252)
      at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:254)
      at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:217)
      at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:83)
      at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
      at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
      at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
      at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
      at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
      at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
      at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:68)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
      at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:163)
      at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
      at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
  Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'OCHEntryServiceImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private de.backend.repositories.OCHEntryRepo de.backend.services.OCHEntryServiceImpl.ochEntryRepo; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [de.backend.repositories.OCHEntryRepo] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
      at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1202)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
      at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302)
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:762)
      at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)
      at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:125)
      at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:60)
      at org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.delegateLoading(AbstractDelegatingSmartContextLoader.java:109)
      at org.springframework.test.context.support.AbstractDelegatingSmartContextLoader.loadContext(AbstractDelegatingSmartContextLoader.java:261)
      at org.springframework.test.context.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:68)
      at org.springframework.test.context.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:86)
      ... 25 more
  Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private de.backend.repositories.OCHEntryRepo de.backend.services.OCHEntryServiceImpl.ochEntryRepo; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [de.backend.repositories.OCHEntryRepo] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
      at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:558)
      at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87)
      at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331)
      ... 41 more
  Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [de.backend.repositories.OCHEntryRepo] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoSuchBeanDefinitionException(DefaultListableBeanFactory.java:1308)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1054)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:949)
      at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:530)
      ... 43 more
  </code></pre>
  
  <hr>
  
  <h2>Additional files</h2>
  
  <p><strong><em>Entity class:</em></strong></p>
  
  <pre><code>package de.backend.entities;
  
  import java.util.Date;
  
  import javax.persistence.Column;
  import javax.persistence.Entity;
  import javax.persistence.GeneratedValue;
  import javax.persistence.Id;
  
  @Entity
  public class OCHEntry {
  
      @Id
      @GeneratedValue
      private Long id;
  
      @Column(nullable = false)
      private String source;
  
      @Column(nullable = false)
      private Date created;
  
      @Column(nullable = false)
      private String title;
  
      @Column(nullable = false)
      private String link;
  
      // getter, setter, hashCode, equals, toString
  }
  </code></pre>
  
  <p><strong><em>Repository:</em></strong></p>
  
  <pre><code>package de.backend.repositories;
  
  import java.util.List;
  
  import org.springframework.data.jpa.repository.JpaRepository;
  import org.springframework.stereotype.Repository;
  
  import de.backend.entities.OCHEntry;
  
  @Repository
  public interface OCHEntryRepo extends JpaRepository&lt;OCHEntry, Long&gt; {
  
      List&lt;OCHEntry&gt; findAllOrderByCreated();
  
      List&lt;OCHEntry&gt; findByTitleLike(String searchCriteria);
  
      List&lt;OCHEntry&gt; findByLinkLike(String searchCriteria);
  
      List&lt;OCHEntry&gt; findAllBySource(String source);
  }
  </code></pre>
  
  <p><strong><em>Service Interface:</em></strong></p>
  
  <pre><code>package de.backend.services.interfaces;
  
  import java.util.List;
  
  import de.backend.entities.OCHEntry;
  
  public interface OCHEntryService {
  
      List&lt;OCHEntry&gt; findAllOrderByCreated();
  
      List&lt;OCHEntry&gt; findAllBySource(String source);
  
      List&lt;OCHEntry&gt; findByTitleLike(String searchCriteria);
  
      List&lt;OCHEntry&gt; findByLinkLike(String searchCriteria);
  
      List&lt;OCHEntry&gt; findAll();
  
      void save(OCHEntry ochEntry);
  }
  </code></pre>
  
  <p><strong><em>Service implementation:</em></strong></p>
  
  <pre><code>package de.backend.services;
  
  import java.util.List;
  
  import org.springframework.beans.factory.annotation.Autowired;
  import org.springframework.stereotype.Service;
  
  import de.backend.entities.OCHEntry;
  import de.backend.repositories.OCHEntryRepo;
  import de.backend.services.interfaces.OCHEntryService;
  
  @Service
  public class OCHEntryServiceImpl implements OCHEntryService {
  
      @Autowired
      private OCHEntryRepo ochEntryRepo;
  
      public List&lt;OCHEntry&gt; findAllOrderByCreated() {
          return this.ochEntryRepo.findAllOrderByCreated();
      }
  
      public List&lt;OCHEntry&gt; findByTitleLike(String searchCriteria) {
          return this.ochEntryRepo.findByTitleLike(searchCriteria);
      }
  
      public List&lt;OCHEntry&gt; findByLinkLike(String searchCriteria) {
          return this.ochEntryRepo.findByLinkLike(searchCriteria);
      }
  
      public List&lt;OCHEntry&gt; findAll() {
          return this.ochEntryRepo.findAll();
      }
  
      public void save(OCHEntry ochEntry) {
          this.ochEntryRepo.save(ochEntry);
      }
  
      @Override
      public List&lt;OCHEntry&gt; findAllBySource(String source) {
          return this.ochEntryRepo.findAllBySource(source);
      }
  }
  </code></pre>
  
  <p><strong><em>ctx-backend:</em></strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans xmlns="http://www.springframework.org/schema/beans"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
      xmlns:context="http://www.springframework.org/schema/context"
      xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
          http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.1.xsd
          http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.1.xsd"&gt;
  
      &lt;context:annotation-config /&gt;
      &lt;context:component-scan base-package="de.backend.*" /&gt;
  
      &lt;!-- Import datasource --&gt;
      &lt;import resource="classpath:META-INF/spring/ctx-datasource.xml" /&gt;
  
  &lt;/beans&gt;
  </code></pre>
  
  <p><strong><em>ctx-datasource:</em></strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans xmlns="http://www.springframework.org/schema/beans"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
      xmlns:c="http://www.springframework.org/schema/c" xmlns:cache="http://www.springframework.org/schema/cache"
      xmlns:context="http://www.springframework.org/schema/context"
      xmlns:jdbc="http://www.springframework.org/schema/jdbc" xmlns:jee="http://www.springframework.org/schema/jee"
      xmlns:jpa="http://www.springframework.org/schema/data/jpa" xmlns:lang="http://www.springframework.org/schema/lang"
      xmlns:p="http://www.springframework.org/schema/p" xmlns:repository="http://www.springframework.org/schema/data/repository"
      xmlns:task="http://www.springframework.org/schema/task" xmlns:tx="http://www.springframework.org/schema/tx"
      xmlns:util="http://www.springframework.org/schema/util"
      xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
          http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.1.xsd
          http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache-4.1.xsd
          http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.1.xsd
          http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-4.1.xsd
          http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-4.1.xsd
          http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa-1.3.xsd
          http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-4.1.xsd
          http://www.springframework.org/schema/data/repository http://www.springframework.org/schema/data/repository/spring-repository-1.7.xsd
          http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-4.1.xsd
          http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.1.xsd
          http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.1.xsd"&gt;
  
      &lt;alias name="jpaVendorAdapterMySql" alias="jpaVendorAdapter" /&gt;
      &lt;bean id="jpaVendorAdapterMySql"
          class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter"&gt;
          &lt;property name="databasePlatform" value="org.hibernate.dialect.MySQLDialect" /&gt;
          &lt;property name="generateDdl" value="true" /&gt;
          &lt;property name="showSql" value="false" /&gt;
      &lt;/bean&gt;
  
      &lt;bean id="dataSource"
          class="org.springframework.jdbc.datasource.DriverManagerDataSource"&gt;
          &lt;property name="username" value="${mysql.username}" /&gt;
          &lt;property name="password" value="${mysql.password}" /&gt;
          &lt;property name="driverClassName" value="${mysql.driverClassName}" /&gt;
          &lt;property name="url" value="${mysql.url}" /&gt;
      &lt;/bean&gt;
  
      &lt;bean id="entityManagerFactory"
          class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"&gt;
          &lt;property name="dataSource" ref="dataSource" /&gt;
          &lt;property name="jpaVendorAdapter" ref="jpaVendorAdapter" /&gt;
          &lt;property name="packagesToScan" value="de.backend.entities.*" /&gt;
      &lt;/bean&gt;
  
      &lt;bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager"&gt;
          &lt;property name="entityManagerFactory" ref="entityManagerFactory" /&gt;
      &lt;/bean&gt;
  
      &lt;tx:annotation-driven transaction-manager="transactionManager" /&gt;
      &lt;jpa:repositories base-package="de.backend.repositories.*" /&gt;
  
      &lt;bean id="datasourcePropertyConfigurer"
          class="org.springframework.context.support.PropertySourcesPlaceholderConfigurer"&gt;
          &lt;property name="location" value="datasource.properties" /&gt;
          &lt;property name="ignoreUnresolvablePlaceholders" value="true" /&gt;
      &lt;/bean&gt;
  
      &lt;bean name="transactionTemplate"
          class="org.springframework.transaction.support.TransactionTemplate"&gt;
          &lt;property name="transactionManager" ref="transactionManager" /&gt;
      &lt;/bean&gt;
  
  &lt;/beans&gt;
  </code></pre>
  
  <p><strong><em>pom.xml - dependencies:</em></strong></p>
  
  <pre><code>&lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
          &lt;artifactId&gt;hibernate-entitymanager&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax.validation&lt;/groupId&gt;
          &lt;artifactId&gt;validation-api&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
          &lt;artifactId&gt;hibernate-validator&lt;/artifactId&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;junit&lt;/groupId&gt;
          &lt;artifactId&gt;junit&lt;/artifactId&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
  
      &lt;!-- Database (H2) --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.h2database&lt;/groupId&gt;
          &lt;artifactId&gt;h2&lt;/artifactId&gt;
      &lt;/dependency&gt;
  
      &lt;!-- DataSource (HikariCP) --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.zaxxer&lt;/groupId&gt;
          &lt;artifactId&gt;HikariCP&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;/dependency&gt;
  
      &lt;!-- JPA Provider (Hibernate) --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
          &lt;artifactId&gt;hibernate-entitymanager&lt;/artifactId&gt;
      &lt;/dependency&gt;
  
      &lt;!-- Spring Data JPA --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.data&lt;/groupId&gt;
          &lt;artifactId&gt;spring-data-jpa&lt;/artifactId&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-orm&lt;/artifactId&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-test&lt;/artifactId&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;log4j&lt;/groupId&gt;
          &lt;artifactId&gt;log4j&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;de.dirrot.dev.parsers&lt;/groupId&gt;
          &lt;artifactId&gt;portal-parsers&lt;/artifactId&gt;
          &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
          &lt;artifactId&gt;slf4j-api&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
          &lt;artifactId&gt;slf4j-log4j12&lt;/artifactId&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  </code></pre>
  
  <h1>Solution:</h1>
  
  <p>The main problem was, that the declaration of the "query by method name" syntax didn't worked. So i altered some methods. And now it works.</p>
  
  <p><strong><em>ctx-backend:</em></strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans xmlns="http://www.springframework.org/schema/beans"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:aop="http://www.springframework.org/schema/aop"
      xmlns:context="http://www.springframework.org/schema/context"
      xmlns:jpa="http://www.springframework.org/schema/data/jpa"
      xsi:schemaLocation="http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.1.xsd
          http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
          http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa-1.3.xsd
          http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.1.xsd"&gt;
  
      &lt;!-- Import datasource --&gt;
      &lt;import resource="classpath:META-INF/spring/ctx-datasource.xml" /&gt;
  
      &lt;context:annotation-config /&gt;
      &lt;jpa:repositories base-package="de.backend.epositories" /&gt;
      &lt;context:component-scan base-package="de.backend.services" /&gt;
  
  &lt;/beans&gt;
  </code></pre>
  
  <p>and</p>
  
  <p><strong><em>OCHEntryRepo:</em></strong></p>
  
  <pre><code>@Repository
  public interface OCHEntryRepo extends JpaRepository&lt;OCHEntry, Long&gt; {
  
      List&lt;OCHEntry&gt; findAll(Sort sort);
  
      List&lt;OCHEntry&gt; findByTitleContaining(String searchCriteria);
  
      List&lt;OCHEntry&gt; findByLinkContaining(String searchCriteria);
  
      List&lt;OCHEntry&gt; findBySource(String source);
  
  }
  </code></pre>
  
  <p>BIG THANKS TO ALL INVOLVED !</p>