//编写自己的代理类
public class DynamicProxyHandler implements InvocationHandler
DynamicProxyHandler hander = new DynamicProxyHandler();
BusinessInterface business = new BusinessClass();BusinessInterface businessProxy = (BusinessInterface) Proxy
.newProxyInstance(business.getClass().getClassLoader(),
business.getClass().getInterfaces(), hander);
businessProxy.doSomething();