Skip to content

Commit c3c15cd

Browse files
committed
Provide class loader to ProxyFactory to create BoundOperation proxies.
Closes #2920
1 parent 5fc6453 commit c3c15cd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/java/org/springframework/data/redis/core/BoundOperationsProxyFactory.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public <T> T createProxy(Class<T> boundOperationsInterface, Object key, DataType
7070
proxyFactory.addAdvice(
7171
new BoundOperationsMethodInterceptor(key, operations, boundOperationsInterface, operationsTarget, delegate));
7272

73-
return (T) proxyFactory.getProxy();
73+
return (T) proxyFactory.getProxy(getClass().getClassLoader());
7474
}
7575

7676
Method lookupRequiredMethod(Method method, Class<?> targetClass, boolean considerKeyArgument) {
@@ -144,9 +144,9 @@ public Object invoke(MethodInvocation invocation) throws Throwable {
144144
yield null;
145145
}
146146
case "getOperations" -> delegate.getOps();
147-
default -> method.getDeclaringClass() == boundOperationsInterface
148-
? doInvoke(invocation, method, operationsTarget, true)
149-
: doInvoke(invocation, method, delegate, false);
147+
default ->
148+
method.getDeclaringClass() == boundOperationsInterface ? doInvoke(invocation, method, operationsTarget, true)
149+
: doInvoke(invocation, method, delegate, false);
150150
};
151151
}
152152

0 commit comments

Comments
 (0)