title: Aspect around advice not triggering on controller
body: <p>I have an aspect advice that tracks the execution of classes annotated with @Service. The code is currently working but I would like to change it to track REST endpoints on controllers instead of autowired services. Here is the code:</p>
  
  <pre><code>@Aspect
  public class AuditingAspect
  {
      @Pointcut(
              //TODO Change pointcut from public methods in Services to REST endpoints in Controllers
              "execution(public * my.base.package..*.*(..))" //Must be in package
                      //+ " &amp;&amp; @within(org.springframework.stereotype.Service)" //Has to be a service
                      + " &amp;&amp; @within(org.springframework.stereotype.Controller)" //Has to be a controller
      )
      public void auditLoggingPointCut() {
          //no op
      }
  
      @Around(value ="auditLoggingPointCut()")
      public Object logAround(final ProceedingJoinPoint joinPoint) throws Throwable
      {
          System.out.println("Exection");
  
          returnVal = joinPoint.proceed();
  
          // Now Do The After Logging Part
          afterReturningLog(joinPoint, returnVal) ;
  
          return returnVal;
      }
  
      private void afterReturningLog(final JoinPoint joinPoint, final Object returnValue)
      {
          System.out.println("Exiting");
      }
  }
  </code></pre>
  
  <p>When I change the "within" from @Service to @Controller, I don't see any output from the advice but the method executes when accessed from the URL. What is different about a Controller that would ignore execution?</p>
  
  <p>The Controller class looks like this:</p>
  
  <pre><code>@Controller
  public class CaseReferralEndpoints {
  
      @Autowired
      CaseReferralFacade caseReferralFacade;
  
      @RequestMapping(value="/backgroundcheck/getcasereferrals", method = RequestMethod.GET)
      @ResponseBody
      public List&lt;CaseReferralSection&gt; getCaseReferrals(@RequestParam("caseID") Long caseID) {
          return caseReferralFacade.getCaseReferrals(caseID); 
      }
  }
  </code></pre>
  
  <p>Here is my applicationContext-aop.xml The full config is much larger but I believe this is the most relevant.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans xmlns="http://www.springframework.org/schema/beans"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xmlns:aop="http://www.springframework.org/schema/aop"
     xsi:schemaLocation="
      http://www.springframework.org/schema/beans 
      http://www.springframework.org/schema/beans/spring-beans.xsd
      http://www.springframework.org/schema/aop 
      http://www.springframework.org/schema/aop/spring-aop.xsd"&gt;
  
  
  
      &lt;bean class="gov.dhs.uscis.elis2.backend.services.logging.AuditingAspect"/&gt;
  
      &lt;aop:aspectj-autoproxy proxy-target-class="false" /&gt;
  
  
  &lt;/beans&gt;
  </code></pre>