标签:spring ring tar user pre oid dao class code
只需要引入:
<dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> </dependency>
就可以可以单元测试:
/** * 测试类 */ public class App { @Test public void test(){ //目标对象 UserDao target = new UserDao(); //代理对象 UserDao proxy = (UserDao)new ProxyFactory(target).getProxyInstance(); //执行代理对象的方法 proxy.save(); } }
标签:spring ring tar user pre oid dao class code
原文地址:https://www.cnblogs.com/leeego-123/p/11903526.html