Skip to content

Commit 8074bc8

Browse files
committed
DATACMNS-325 - RepositoryInterfaceAwareBeanPostProcess now implements PriorityOrdered.
This makes sure it is also applied in cases of dependency lookups for {{BeanPostProcessor}} implementation's dependencies.
1 parent 71a251c commit 8074bc8

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/main/java/org/springframework/data/repository/core/support/RepositoryInterfaceAwareBeanPostProcessor.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
2828
import org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessorAdapter;
2929
import org.springframework.beans.factory.config.TypedStringValue;
30+
import org.springframework.core.Ordered;
31+
import org.springframework.core.PriorityOrdered;
3032
import org.springframework.util.ClassUtils;
3133

3234
/**
@@ -38,7 +40,7 @@
3840
* @author Oliver Gierke
3941
*/
4042
class RepositoryInterfaceAwareBeanPostProcessor extends InstantiationAwareBeanPostProcessorAdapter implements
41-
BeanFactoryAware {
43+
BeanFactoryAware, PriorityOrdered {
4244

4345
private static final Logger LOGGER = LoggerFactory.getLogger(RepositoryInterfaceAwareBeanPostProcessor.class);
4446
private static final Class<?> REPOSITORY_TYPE = RepositoryFactoryBeanSupport.class;
@@ -114,4 +116,12 @@ private Class<?> getClassForPropertyValue(PropertyValue propertyValue, String be
114116
return Void.class;
115117
}
116118
}
119+
120+
/*
121+
* (non-Javadoc)
122+
* @see org.springframework.core.Ordered#getOrder()
123+
*/
124+
public int getOrder() {
125+
return Ordered.LOWEST_PRECEDENCE - 1;
126+
}
117127
}

0 commit comments

Comments
 (0)