I want to apply the Dynamic Proxy I created to all the classes that are part of my application. But, I also want to be able to use dependency injection (Spring) instead of writing something like MyDynamicProxy.newInstance(new Account());
Where newInstance is:
public static Object newInstance(Object object) {
return Proxy.newProxyInstance(object.getClass().getClassLoader(),object.getClass().getInterfaces(),new LoggingProxy(object));
}
How can I apply Dependency Injection and Dynamic Proxy to all the classes in my application?
以上就是Apply Dynamic Proxy to all the classes in an application的详细内容,更多请关注web前端其它相关文章!