我在配置Spring的时候,想配置两个切面
<aop:config>
<aop:pointcut id="allManageMethod"
expression="execution(* com.lhq.prj.bms.service.impl.*.*(..))"/>
<aop:advisor advice-ref="txAdvice" pointcut-ref="allManagerMethod"/>
</aop:config>
这是其中的一个切面
我还想配置另一个切面为 * com.czccb.bmsh.service.impl.*.*(..) 该怎么配置啊,是不是就像下面这样啊
<aop:config>
<aop:pointcut id="allManageMethod1"
expression="execution(* com.lhq.prj.bms.service.impl.*.*(..))"/>
<aop:advisor advice-ref="txAdvice" pointcut-ref="allManagerMethod1"/>
<aop:pointcut id="allManageMethod2"
expression="execution(* com.czccb.bmsh.service.impl.*.*(..)"/>
<aop:advisor advice-ref="txAdvice" pointcut-ref="allManagerMethod2"/>
</aop:config>这样行不行啊,还是需要别的配置方法啊,大家帮帮我啊,谢谢了
<aop:config>
<aop:pointcut id="allManageMethod"
expression="execution(* com.lhq.prj.bms.service.impl.*.*(..))"/>
<aop:advisor advice-ref="txAdvice" pointcut-ref="allManagerMethod"/>
</aop:config>
这是其中的一个切面
我还想配置另一个切面为 * com.czccb.bmsh.service.impl.*.*(..) 该怎么配置啊,是不是就像下面这样啊
<aop:config>
<aop:pointcut id="allManageMethod1"
expression="execution(* com.lhq.prj.bms.service.impl.*.*(..))"/>
<aop:advisor advice-ref="txAdvice" pointcut-ref="allManagerMethod1"/>
<aop:pointcut id="allManageMethod2"
expression="execution(* com.czccb.bmsh.service.impl.*.*(..)"/>
<aop:advisor advice-ref="txAdvice" pointcut-ref="allManagerMethod2"/>
</aop:config>这样行不行啊,还是需要别的配置方法啊,大家帮帮我啊,谢谢了
解决方案 »
- 发现Thing in Java翻译的错误,大家进来鉴定一下!
- InputStream的read方法的问题
- resultSet是只读的,如何将它变成可写的?
- 请问document doc是什么?
- 关于int 与Integer的不同.请详细说明并举例!
- JAVA新手,关于import的问题的。
- 析取数组里的值...然后分别排列?各位高手快来帮忙啊!
- 我一次要从一个文件里面读3万条数据,非常慢,有没有什么读取方法可以改善?
- 关于processEvent 与processActionEvent两个事件,在线等候
- 关于Object的问题
- 关于swingX 中的ColumnControlButton实现Jtable的列隐藏和显示的问题?
- 我将字符:┬ 写入Swing的JTextArea或者JTextField中,为什么显示就不正常了?
<aop:config>
<aop:pointcut id="allManageMethod1"
expression="execution(* com.lhq.prj.bms.service.impl.*.*(..))"/>
<aop:advisor advice-ref="txAdvice" pointcut-ref="allManagerMethod1"/>
<aop:pointcut id="allManageMethod2"
expression="execution(* com.czccb.bmsh.service.impl.*.*(..)"/>
<aop:advisor advice-ref="txAdvice" pointcut-ref="allManagerMethod2"/>
</aop:config>
修改成
<aop:config>
<aop:pointcut id="allManageMethod1"
expression="execution(* com.lhq.prj.bms.service.impl.*.*(..))"/>
<aop:pointcut id="allManageMethod2"
expression="execution(* com.czccb.bmsh.service.impl.*.*(..)"/>
<aop:advisor advice-ref="txAdvice" pointcut-ref="allManagerMethod1"/>
<aop:advisor advice-ref="txAdvice" pointcut-ref="allManagerMethod2"/>
</aop:config> 你先这样试试看吧!