使用代理时,接口在 ClassLoader 中不可见?
当我尝试使用动态代理时,我看到以下异常
com.intellij.rt.execution.application.AppMain DynamicProxy.DynamicProxy
Exception in thread "main" java.lang.IllegalArgumentException: interface Interfaces.IPerson is not visible from class loader
at java.lang.reflect.Proxy.getProxyClass(Proxy.java:353)
at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:581)
at DynamicProxy.Creator.getProxy(Creator.java:18)
at DynamicProxy.DynamicProxy.main(DynamicProxy.java:54)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
任何想法我需要做些什么来解决它