`
I_conquer
  • 浏览: 24550 次
  • 性别: Icon_minigender_1
  • 来自: 成都
社区版块
存档分类
最新评论

(转)expression="execution(*service..*.*(..))"

 
阅读更多

(* com.evan.crm.service.*.*(..))中几个通配符的含义: 


|第一个 * —— 通配 随便率性返回值类型| 
|第二个 * —— 通配包com.evan.crm.service下的随便率性class| 
|第三个 * —— 通配包com.evan.crm.service下的随便率性class的随便率性办法| 
|第四个 .. —— 通配 办法可以有0个或多个参数| 

 

<!-- 配置那些类的方法进行事务管理 --> 
<aop:config> 
<aop:pointcut id="allServiceMethod" expression="execution (* com.cms.sys.service.*.*(..))" />
<aop:advisor advice-ref="txAdvice" pointcut-ref="allServiceMethod" /> 
</aop:config> 

还有一个 
execution (* com.cms.art.service.*.*(..))" 

要怎么写?

 

 

可以这样写:将execution分开写。 
<aop:config> 
<aop:pointcut id="allServiceMethod" expression="(execution (* com.cms.sys.service.*.*(..)))or (execution (* com.cms.art.service.*.*(..)))" />
<aop:advisor advice-ref="txAdvice" pointcut-ref="allServiceMethod" /> 
</aop:config> 

 

原文地址:http://hi.baidu.com/suofang/item/1bea72b7315c3497194697ea

分享到:
评论

相关推荐

    Spring AOP配置源码

    &lt;aop:pointcut expression="execution(* com.spring.service..*(..))" id="pointCut"/&gt;声明一个切入点,注意execution表达式的写法 &lt;aop:before method="before" pointcut-ref="pointCut"/&gt; aop前置通知 ...

    struts2.3+hibernate3.6+spring3.1整合的纯xml配置的小项目

    expression="execution(* x.y.service.*Service.*(..))" /&gt; id="noTxServiceOperation" expression="execution(* x.y.service.ddl.DefaultDdlManager.*(..))" /&gt; pointcut-ref="defaultServiceOperation" ...

    Maven拆分代码.zip

    &lt;!--配置连接池--&gt; ... &lt;property name="url" value="jdbc:mysql:///... &lt;aop:pointcut id="pointcut" expression="execution(* com.itheima.service.impl.*.*(..))"/&gt; &lt;aop:advisor advice-ref="advice" pointcut-ref=

    SSH第7章上机.zip ACCP8.0

    &lt;aop:pointcut expression="execution(* com.direct.service.*.*(..))" id="transactionPointCut"/&gt; &lt;aop:advisor advice-ref="transactionAdvice" pointcut-ref="transactionPointCut"/&gt; spring和struts2的整合 ...

    springmvc-ibatis

    &lt;aop:pointcut expression="execution(* com.org.service.*.*(..))" id="bussinessService" /&gt; &lt;aop:advisor advice-ref="txAdvice" pointcut-ref="bussinessService"/&gt; &lt;!-- 配置那个类那个方法用到事务...

    SpringMVC+Hibernate全注解整合

    &lt;aop:pointcut expression="execution(public * com.org.service.*.*(..))" id="bussinessService" /&gt; &lt;aop:advisor advice-ref="txAdvice" pointcut-ref="bussinessService" /&gt; &lt;!-- 配置那个类那个方法...

    springmvcmybatis

    &lt;property name="mapperLocations" value="classpath:mapping/*.xml"&gt; &lt;!-- DAO接口所在包名,Spring会自动查找其下的类 --&gt; &lt;bean class="org.mybatis.spring.mapper.MapperScannerConfigurer"&gt; ...

    三大框架下分页源代码

    &lt;aop:pointcut id="allServiceMethod" expression="execution(* com.cstp.service.*.*(..))"/&gt; &lt;aop:advisor pointcut-ref="allServiceMethod" advice-ref="txAdvice"/&gt; &lt;!-- 新闻类型 --&gt; &lt;bean id=...

    SpringMVC-SSH全注解

    &lt;aop:pointcut expression="execution(public * com.org.core.service.*.*(..))" id="bussinessService" /&gt; &lt;aop:advisor advice-ref="txAdvice" pointcut-ref="bussinessService" /&gt; &lt;!-- 配置那个类...

    spring3.2+strut2+hibernate4

    -- &lt;aop:pointcut id="myPointcut" expression="execution(public * com.sbz.*.service.*.*(..))"/&gt;--&gt; &lt;!-- &lt;aop:advisor advice-ref="myAdvice" pointcut-ref="myPointcut"/&gt;--&gt; &lt;!-- &lt;/aop:config&gt;--&gt; &lt;!--AOP...

    Hungry Minds - Visual Basic.NET Visual Blueprint (VBL).pdf

    1)GETTING STARTED WITH VISUAL BASIC .NET An Introduction to Visual Basic .NET ................................................................................2 Install Visual Studio .NET.................

    JavaEE 5.0 Tutorial.pdf

    Sun 官方 J2ee 5.0 教程 The Java EE 5Tutorial For Sun Java System Application Server 9.1 Contents Preface ..................................................................................................

    JBPM4.4用户手册.doc

    5.9. ManagementService管理服务 5.10. 查询 API 6. jPDL 6.1. process流程处理 6.2. 控制流程Activities活动 6.2.1. start启动 6.2.2. State状态节点 6.2.2.1. 序列状态节点 6.2.2.2. 可选择的状态节点 6.2.3. ...

    jBPM4.3用户指南

    5.9. ManagementService管理服务 5.10. 查询 API 6. jPDL 6.1. process流程处理 6.2. 控制流程Activities活动 6.2.1. start启动 6.2.2. State状态节点 6.2.2.1. 序列状态节点 6.2.2.2. 可选择的状态节点 ...

    2009 达内Unix学习笔记

    集合了 所有的 Unix命令大全 ...telnet 192.168.0.23 自己帐号 sd08077-you0 ftp工具 192.168.0.202 tools-toolss ... 各个 shell 可互相切换 ksh:$ sh:$ csh:guangzhou% bash:bash-3.00$ ... 命令和参数之间必需用空格隔...

    javaee API

    javax.el Provides the API for the Unified Expression Language shared by the JSP 2.1 and JSF 1.2 technologies. javax.enterprise.deploy.model Provides Tool Vendor implementation classes. javax....

    Devart dbForge Studio for MySQL Professional Edition v7.1.13

    Visual query creation with diagram and expression editor. Queries of any complexity can be created in several seconds. The GUI tool automatically adds joinsbetween tables and allows working with ...

Global site tag (gtag.js) - Google Analytics