设为首页 加入收藏

TOP

Spring框架的AOP编程,最通俗的语言解释,易懂易学(二)
2019-09-03 02:23:54 】 浏览:36
Tags:Spring 框架 AOP 编程 通俗 语言 解释 易懂 易学
id testAop2() { //cglib动态代理 ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml"); TestService testProxy = context.getBean("testProxy", TestService.class); System.out.println(testProxy.getClass().getName()); System.out.println(testProxy.getClass().getSuperclass().getName()); testProxy.test(); } @Test public void testAop() { //jdk动态代理 ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml"); UserService userService = context.getBean("proxy", UserService.class); System.out.println(userService.getClass().getName()); userService.demo(); } }

  

 

首页 上一页 1 2 下一页 尾页 2/2/2
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇基于IDEA实现SSM整合框架的搭建配.. 下一篇用IDEA写出第一个java web

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目