-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Description
public static Object newProxyInstance(ClassLoader loader,
Class<?>[] interfaces,
InvocationHandler h) {
Objects.requireNonNull(h);
final Class<?> caller = System.getSecurityManager() == null
? null
: Reflection.getCallerClass();
/*
* Look up or generate the designated proxy class and its constructor.
*/
Constructor<?> cons = getProxyConstructor(caller, loader, interfaces);
return newProxyInstance(caller, cons, h);
}第二个传入的参数应该是接口,需重新定义个接口,让HelloWorldService实现
return Proxy.newProxyInstance(getClass().getClassLoader(), adviceSupport.getTargetSource().getTargetClass().getInterfaces() , this);
Metadata
Metadata
Assignees
Labels
No labels