首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件架构设计 >

Spring事宜配置的通配符的说明

2012-08-27 
Spring事务配置的通配符的说明例子: aop:configaop:pointcut idinterceptorPointCutsexpressionex

Spring事务配置的通配符的说明
例子:

 <aop:config>        <aop:pointcut id="interceptorPointCuts"            expression="execution(* com.yan.service.impl.*.*(..))" />        <aop:advisor advice-ref="txAdvice"            pointcut-ref="interceptorPointCuts" />           </aop:config>  


解释一下(* com.yan.service.impl.*.*(..))中几个通配符的含义:
第一个 * —— 通配 任意返回值类型
第二个 * —— 通配 包com.yan.service.impl下的任意class
第三个 * —— 通配 包com.yan.service.impl下的任意class的任意方法
第四个 .. —— 通配 方法可以有0个或多个参数

热点排行