From f53795d48e705f68fcaebbb80f288d3a75c3a7d7 Mon Sep 17 00:00:00 2001 From: Oliver Gierke Date: Tue, 26 Jul 2016 09:46:15 +0200 Subject: [PATCH] =?UTF-8?q?DATACMNS-880=20-=20TransactionalRepositoryFacto?= =?UTF-8?q?ryBeanSupport.setBeanFactory(=E2=80=A6)=20now=20delegates=20to?= =?UTF-8?q?=20parent=20implementation.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously TransactionalRepositoryFactoryBeanSupport.setBeanFactory(…) didn't invoke the method of the super class preventing the BeanFactory to be propagated to the repository factory resulting in the ProjectionFactory implementation created being unaware of the BeanFactory and thus no bean references being available in projection interfaces. --- ...sactionalRepositoryFactoryBeanSupport.java | 4 +++- ...RepositoryFactoryBeanSupportUnitTests.java | 20 ++++++++++++++++--- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/springframework/data/repository/core/support/TransactionalRepositoryFactoryBeanSupport.java b/src/main/java/org/springframework/data/repository/core/support/TransactionalRepositoryFactoryBeanSupport.java index 2f5f47b4e..9d98d6ff4 100644 --- a/src/main/java/org/springframework/data/repository/core/support/TransactionalRepositoryFactoryBeanSupport.java +++ b/src/main/java/org/springframework/data/repository/core/support/TransactionalRepositoryFactoryBeanSupport.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2015 the original author or authors. + * Copyright 2008-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -91,6 +91,8 @@ public abstract class TransactionalRepositoryFactoryBeanSupport, Object, Long> { + static class SampleTransactionalRepositoryFactoryBean + extends TransactionalRepositoryFactoryBeanSupport, Object, Long> { private final CrudRepository repository = mock(CrudRepository.class);