DATACMNS-749 - RepositoryFactorySupport now registers global ExposeInvocationInterceptor.
This frees RepositoryProxyPostProcessors from having to register the interceptor manually and thus prevents it from being registered multiple times.
This commit is contained in:
@@ -27,6 +27,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
import org.aopalliance.intercept.MethodInterceptor;
|
||||
import org.aopalliance.intercept.MethodInvocation;
|
||||
import org.springframework.aop.framework.ProxyFactory;
|
||||
import org.springframework.aop.interceptor.ExposeInvocationInterceptor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.BeanClassLoaderAware;
|
||||
import org.springframework.core.GenericTypeResolver;
|
||||
@@ -188,6 +189,8 @@ public abstract class RepositoryFactorySupport implements BeanClassLoaderAware {
|
||||
result.setTarget(target);
|
||||
result.setInterfaces(new Class[] { repositoryInterface, Repository.class });
|
||||
|
||||
result.addAdvice(ExposeInvocationInterceptor.INSTANCE);
|
||||
|
||||
if (TRANSACTION_PROXY_TYPE != null) {
|
||||
result.addInterface(TRANSACTION_PROXY_TYPE);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user