I am seeing following exception when I try to use dynamic proxy
com.intellij.rt.execution.application.AppMain DynamicProxy.DynamicProxy
Exception in thread
I had the same problem using spring boot, I solve it injecting ResourceLoader, getting its class loader.
@Autowired
private ResourceLoader resourceLoader;
....
ClassLoader classLoader = resourceLoader.getClassLoader();
...
Proxy.newProxyInstance(
classLoader, //for example...
new Class < ? >[] {MyInterface.class},
new InvocationHandler() {
// (...)
});