title: How to inject session in spring data neo4j 4.2.x custom repository?
body: <p>I'm migrating from spring-data-neo4j version 4.1 to 4.2.
  On the application startup I'm getting an error:
  <code>
  Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.neo4j.ogm.session.Session' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
  </code></p>
  
  <p>repository.ActivityRecordRepository.java:</p>
  
  <pre><code>public interface ActivityRecordRepository extends GraphRepository&lt;ActivityRecord&gt;, ActivityRecordRepositoryCustom {}
  </code></pre>
  
  <p>repository.ActivityRecordRepositoryCustom.java:</p>
  
  <pre><code>public interface ActivityRecordRepositoryCustom {
     ...
  }
  </code></pre>
  
  <p>repository.impl.ActivityRecordRepositoryImpl.java:</p>
  
  <pre><code>public class ActivityRecordRepositoryImpl implements ActivityRecordRepositoryCustom {
  
      private final Session session;
  
      public ActivityRecordRepositoryImpl(Session session) {
          this.session = session;
      }
  
      ....
  }
  </code></pre>
  
  <p>My configuration:</p>
  
  <pre><code>@ComponentScan
  @Configuration
  @EnableNeo4jRepositories("com.example.repository")
  @EnableTransactionManagement
  public class ApplicationConfiguration {
  
      ....        
  
      @Bean
      public EventListener eventListener() {
          return new CustomEventListener();
      }
  
      @Bean
      public SessionFactory getSessionFactory() {       
          final SessionFactory sessionFactory = new SessionFactory(databaseConfiguration, "com.example.entity");
          sessionFactory.register(eventListener());
          return sessionFactory;
      }
  }
  </code></pre>
  
  <p>How to properly autowire session object to custom repository implementation?</p>
  
  <p>I'm using:
  Spring Version: 4.3.2.RELEASE<br>
  Spring Data Neo4j Version: 4.2.11.RELEASE</p>