Only need to introduce:
<dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> </dependency>
Unit tests can be:
/** * Test class */ public class App { @Test public void Test () { // audiences UserDao target = new new UserDao (); //代理对象 UserDao proxy = (UserDao)new ProxyFactory(target).getProxyInstance(); // method to perform the proxy object proxy.save (); } }