ITeye博客

使用Spring的注解方式实现AOP入门

cuiran · 2009-10-14 21:34 · Spring小结 · Markdown

beans.xml文件如下

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:context="http://www.springframework.org/schema/context"
       xmlns:aop="http://www.springframework.org/schema/aop"     
       xsi:schemaLocation="http://www.springframework.org/schema/beans
           http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
           http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
           http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">
        <aop:aspectj-autoproxy/>
        <bean id="myInterceptor" class="org.springaop.service.MyInterceptor"/>
        <bean id="personService" class="org.springaop.service.impl.PersonServiceBean"/>
</beans>

 

工程详见附件!

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。