spring中用aop,只对其中的一个方法有用,比如所说,权限检查,我想对add方法进行权限检查,在add方法之前进行检查,但是我不知道怎么配置
class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<bean id="transactionInterceptor"
class="org.springframework.transaction.interceptor.TransactionInterceptor"
>
<property name="transactionManager">
<ref bean="transactionManager"/>
</property>
<property name="transactionAttributes">
<props>
<prop key="add*">
PROPAGATION_REQUIRED,-AccountException
</prop>
</props>
</property>
</bean>
再忘下就不会配置了,有谁能给指点一下啊
[b]问题补充:[/b]
我还想增加日志功能,比如说,可以在add方法之前进行,也可以在add之后进行,用annotation,也可以用下一种方式,
aop:config
/aop:aspect
/aop:config
,我把spring-aop-2.5.xsd导入的时候有错误,我不想用上面的方法,还有更好的方法吗
[b]问题补充:[/b]
我的意思是说,利用动态代理,对service(里面有好多方法)里面的add方法之前增加日志功能,这个代码怎么实现