title: How to specify single pointcut for multiple packages
body: <p>I am using Aspect for logging activities in my spring mvc based application. I am using <strong>@controller</strong> annotations to define any controller in my application. I have two different controller in two different package say </p>
  
  <ul>
  <li>com.package1 contains controller 1 class, let's name it as AController</li>
  <li>com.package2 contains controller 2 class, let's name it as BController</li>
  </ul>
  
  <p>I am able to apply aspect to one particular package of controllers by using </p>
  
  <pre><code>&lt;aop:config&gt;
      &lt;aop:pointcut id="pointcut1"
          expression="execution(* package1.*.*(..))"
          id="policy1" /&gt;
      &lt;aop:aspect ref="aspect1" order="1"&gt;
          &lt;aop:before pointcut-ref="pointcut1" method="before" arg-names="joinPoint" /&gt;
          &lt;aop:after-returning returning="returnValue" arg-names="joinPoint, returnValue" pointcut-ref="pointcut1" method="after"  /&gt;
      &lt;/aop:aspect&gt;
  &lt;/aop:config&gt;
  
  
  &lt;bean id="aspect1" class="com......aspectclass" /&gt;
  </code></pre>
  
  <p>My question is how to specify more that one  different package in <strong>expression(* package1.<em>.</strong>.</em>(..))**.</p>
  
  <p>Right now I am declaring one separate pointcut for each package and in aspect one separate <code>aop:before</code> and <code>aop:after</code> entry for each pointcut. But I think this should be ideal way to define multiple packages pointcut.</p>