Spring AOP源码分析--代理方式的选择 (6)

public class Test { public static void main(String[] args) throws Exception { //获取ILoginBaseController的字节码 byte[] bytes = ProxyGenerator.generateProxyClass("$Proxy#MyLoginController", new Class[]{ILoginBaseController.class}); //输出到MyLoginController.class文件 FileOutputStream fileOutputStream = new FileOutputStream(new File("MyLoginController.class")); fileOutputStream.write(bytes); fileOutputStream.flush(); fileOutputStream.close(); } }

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wsswww.html