锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲hairy多毛pics大全,亚洲另类小说图片,国产亚洲精品拍拍拍拍拍http://www.tkk7.com/star/category/33292.htmlMemozh-cnFri, 25 Jul 2008 16:20:12 GMTFri, 25 Jul 2008 16:20:12 GMT60Sharing common pointcut definitionshttp://www.tkk7.com/star/articles/217586.htmlstarstarFri, 25 Jul 2008 14:53:00 GMThttp://www.tkk7.com/star/articles/217586.htmlhttp://www.tkk7.com/star/comments/217586.htmlhttp://www.tkk7.com/star/articles/217586.html#Feedback0http://www.tkk7.com/star/comments/commentRss/217586.htmlhttp://www.tkk7.com/star/services/trackbacks/217586.htmlWhen working with enterprise applications, you often want to refer to modules of the application and particular sets of operations from within several aspects. We recommend defining a "SystemArchitecture" aspect that captures common pointcut expressions for this purpose. A typical such aspect would look as follows:

 

package com.xyz.someapp;

import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;

@Aspect
public class SystemArchitecture {

  
/**
   * A join point is in the web layer if the method is defined
   * in a type in the com.xyz.someapp.web package or any sub-package
   * under that.
   
*/

  @Pointcut(
"within(com.xyz.someapp.web..*)")
  
public void inWebLayer() {}

  
/**
   * A join point is in the service layer if the method is defined
   * in a type in the com.xyz.someapp.service package or any sub-package
   * under that.
   
*/

  @Pointcut(
"within(com.xyz.someapp.service..*)")
  
public void inServiceLayer() {}

  
/**
   * A join point is in the data access layer if the method is defined
   * in a type in the com.xyz.someapp.dao package or any sub-package
   * under that.
   
*/

  @Pointcut(
"within(com.xyz.someapp.dao..*)")
  
public void inDataAccessLayer() {}

  
/**
   * A business service is the execution of any method defined on a service
   * interface. This definition assumes that interfaces are placed in the
   * "service" package, and that implementation types are in sub-packages.
   * 
   * If you group service interfaces by functional area (for example, 
   * in packages com.xyz.someapp.abc.service and com.xyz.def.service) then
   * the pointcut expression "execution(* com.xyz.someapp..service.*.*(..))"
   * could be used instead.
   *
   * Alternatively, you can write the expression using the 'bean'
   * PCD, like so "bean(*Service)". (This assumes that you have
   * named your Spring service beans in a consistent fashion.)
   
*/

  @Pointcut(
"execution(* com.xyz.someapp.service.*.*(..))")
  
public void businessService() {}
  
  
/**
   * A data access operation is the execution of any method defined on a 
   * dao interface. This definition assumes that interfaces are placed in the
   * "dao" package, and that implementation types are in sub-packages.
   
*/

  @Pointcut(
"execution(* com.xyz.someapp.dao.*.*(..))")
  
public void dataAccessOperation() {}

}

The pointcuts defined in such an aspect can be referred to anywhere that you need a pointcut expression. For example, to make the service layer transactional, you could write:

 

<aop:config>
  
<aop:advisor 
      
pointcut="com.xyz.someapp.SystemArchitecture.businessService()"
      advice-ref
="tx-advice"/>
</aop:config>

<tx:advice id="tx-advice">
  
<tx:attributes>
    
<tx:method name="*" propagation="REQUIRED"/>
  
</tx:attributes>
</tx:advice>

The <aop:config> and <aop:advisor> elements are discussed in Section 6.3, “Schema-based AOP support”. The transaction elements are discussed in Chapter 9, Transaction management.



star 2008-07-25 22:53 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 免费看大黄高清网站视频在线| 一级毛片免费观看不卡视频| 美女视频黄的全免费视频| 亚洲欧洲无码AV电影在线观看| 有色视频在线观看免费高清在线直播 | 亚洲第一se情网站| 看全色黄大色大片免费久久| 亚洲色www永久网站| 色se01短视频永久免费| 亚洲一区在线视频观看| 免费在线观看的网站| 亚洲乱码一区二区三区国产精品| 国产人在线成免费视频| 一本色道久久88亚洲精品综合| 毛片高清视频在线看免费观看| 99亚偷拍自图区亚洲| 国产精品美女自在线观看免费 | 日韩内射激情视频在线播放免费 | 亚洲第一成年免费网站| 亚洲日韩中文字幕无码一区| 国产真人无遮挡作爱免费视频| 亚洲乱码在线卡一卡二卡新区| 免费**毛片在线播放直播| 国内精品99亚洲免费高清| 久久精品国产亚洲精品2020| 18勿入网站免费永久| 国产亚洲精彩视频| 亚洲综合熟女久久久30p| 一级成人a毛片免费播放| youjizz亚洲| 免费A级毛片在线播放不收费| 国产日韩AV免费无码一区二区| 亚洲国色天香视频| 一级一看免费完整版毛片| 久久国产精品亚洲综合| yellow视频免费看| 久久亚洲精品成人AV| 国产精品二区三区免费播放心 | 十八禁无码免费网站| 亚洲午夜一区二区三区| 国产精品亚洲mnbav网站 |