diff --git a/org.springframework.aop/src/main/java/org/springframework/aop/framework/AopProxyUtils.java b/org.springframework.aop/src/main/java/org/springframework/aop/framework/AopProxyUtils.java index af9e277b5231..9f203a69be4a 100644 --- a/org.springframework.aop/src/main/java/org/springframework/aop/framework/AopProxyUtils.java +++ b/org.springframework.aop/src/main/java/org/springframework/aop/framework/AopProxyUtils.java @@ -86,10 +86,11 @@ public static Class[] completeProxiedInterfaces(AdvisedSupport advised) { Class[] specifiedInterfaces = advised.getProxiedInterfaces(); if (specifiedInterfaces.length == 0) { // No user-specified interfaces: check whether target class is an interface. - Class targetClass = advised.getTargetClass(); + Class targetClass = advised.getTargetClass(); if (targetClass != null) { if (targetClass.isInterface()) { - advised.setInterfaces(targetClass); + specifiedInterfaces = new Class[] {targetClass}; + advised.setInterfaces(specifiedInterfaces); } else if (Proxy.isProxyClass(targetClass)) { advised.setInterfaces(targetClass.getInterfaces());