From 8074bc87e86489149b4b15266697f4f99d792e5e Mon Sep 17 00:00:00 2001 From: Oliver Gierke Date: Sat, 4 May 2013 13:50:52 +0200 Subject: [PATCH] DATACMNS-325 - RepositoryInterfaceAwareBeanPostProcess now implements PriorityOrdered. This makes sure it is also applied in cases of dependency lookups for {{BeanPostProcessor}} implementation's dependencies. --- .../RepositoryInterfaceAwareBeanPostProcessor.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/springframework/data/repository/core/support/RepositoryInterfaceAwareBeanPostProcessor.java b/src/main/java/org/springframework/data/repository/core/support/RepositoryInterfaceAwareBeanPostProcessor.java index 88a00e6e4..17ca5d6be 100644 --- a/src/main/java/org/springframework/data/repository/core/support/RepositoryInterfaceAwareBeanPostProcessor.java +++ b/src/main/java/org/springframework/data/repository/core/support/RepositoryInterfaceAwareBeanPostProcessor.java @@ -27,6 +27,8 @@ import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; import org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessorAdapter; import org.springframework.beans.factory.config.TypedStringValue; +import org.springframework.core.Ordered; +import org.springframework.core.PriorityOrdered; import org.springframework.util.ClassUtils; /** @@ -38,7 +40,7 @@ import org.springframework.util.ClassUtils; * @author Oliver Gierke */ class RepositoryInterfaceAwareBeanPostProcessor extends InstantiationAwareBeanPostProcessorAdapter implements - BeanFactoryAware { + BeanFactoryAware, PriorityOrdered { private static final Logger LOGGER = LoggerFactory.getLogger(RepositoryInterfaceAwareBeanPostProcessor.class); private static final Class REPOSITORY_TYPE = RepositoryFactoryBeanSupport.class; @@ -114,4 +116,12 @@ class RepositoryInterfaceAwareBeanPostProcessor extends InstantiationAwareBeanPo return Void.class; } } + + /* + * (non-Javadoc) + * @see org.springframework.core.Ordered#getOrder() + */ + public int getOrder() { + return Ordered.LOWEST_PRECEDENCE - 1; + } }