首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > ASP >

aspectj 引来通知 实例

2012-09-08 
aspectj 引入通知实例你懂的package com.meiyoudao.testimport org.springframework.context.Application

aspectj 引入通知 实例
你懂的

package com.meiyoudao.test;import org.springframework.context.ApplicationContext;import org.springframework.context.support.ClassPathXmlApplicationContext;import com.meiyoudao.service.BuyPersonBySexService;import com.meiyoudao.service.BuyPersonService;public class BuyPersonTest {public static void main(String[] args) {ApplicationContext app = new ClassPathXmlApplicationContext("MyXml.xml");BuyPersonService buyPerson = (BuyPersonService)app.getBean("buyPerson");buyPerson.buySomebody();BuyPersonBySexService buyPersonSex = (BuyPersonBySexService)buyPerson;buyPersonSex.buyPersonBySex();}}

热点排行