title: Spring AOP Advise not work for all controller, work for one controller only
body: <p>Find below code I have created.</p>
  
  <p>I want to log(AOP Advice before,after etc.) all controller methods,
  but advise apply only one controller (AuthenticationController) methods is executed, on second controller (UserManagerController) methods advise are not apply,both controller are in the same package(com.framework.controller),but I don't know whats go wrong?why its apply only one controller not other.</p>
  
  <hr>
  
  <p><strong>web.xml</strong></p>
  
  <pre><code>&lt;context-param&gt;
      &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
      &lt;param-value&gt;
              /WEB-INF/applicationContext.xml
      &lt;/param-value&gt;
  &lt;/context-param&gt;
  
  &lt;listener&gt;
      &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt;
  &lt;/listener&gt;
  
  &lt;!-- Dispatcher Servlet --&gt;
  &lt;servlet&gt;
      &lt;servlet-name&gt;dispatcher&lt;/servlet-name&gt;
      &lt;servlet-class&gt;org.springframework.web.servlet.DispatcherServlet&lt;/servlet-class&gt;
      &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
  &lt;/servlet&gt;
  &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;dispatcher&lt;/servlet-name&gt;
      &lt;url-pattern&gt;*.htm&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  </code></pre>
  
  <hr>
  
  <p><strong>applicationContext.xml</strong></p>
  
  <pre><code>&lt;!-- Used to activate applied annotations in already registered beans in application context --&gt;
  &lt;!-- Declares support for general annotations such as @Required, @Autowired, @PostConstruct, and so on --&gt;
  &lt;context:annotation-config /&gt;
  &lt;context:component-scan base-package="com.framework.*"/&gt;
  &lt;!-- ***************************************************************** --&gt;
  
  &lt;!-- Declares explicit support for annotation-driven MVC controllers (i.e. @RequestMapping, @Controller, @RequestBody/ResponseBody) --&gt;
  &lt;mvc:annotation-driven /&gt;
  
  &lt;!-- Logging Aspect --&gt;
  &lt;bean id="frameworkLoggingAspect" class="com.framework.aspect.FrameworkLoggingAspect" /&gt;
  
  &lt;!-- Enable @AspectJ annotation support  --&gt;
  &lt;aop:aspectj-autoproxy proxy-target-class="true"&gt;
      &lt;aop:include name="frameworkLoggingAspect" /&gt;
  &lt;/aop:aspectj-autoproxy&gt;
  </code></pre>
  
  <hr>
  
  <p>Find my Aspect class
  <strong>FrameworkLoggingAspect.java</strong></p>
  
  <pre><code>@Aspect
  public class FrameworkLoggingAspect {
  @Pointcut("execution(* com.framework.controller.*.*(..))")
  public void beforeControllerMethod() {
  }
  
  @Pointcut("execution(* com.framework.controller.*.*(..))")
  public void afterControllerMethod() {
  }
  
  @Before("beforeControllerMethod()")
  public void logBeforeAllMethods(JoinPoint joinPoint) {
      CustomLogger.info(" Before Name " + joinPoint.getSignature().getName());
      CustomLogger.info(" Before Modifier " + joinPoint.getSignature().getModifiers());
  }
  
  @After("afterControllerMethod()")
  public void logAfterAllMethods(JoinPoint joinPoint) {
      CustomLogger.info(" After Name " + joinPoint.getSignature().getName());
      CustomLogger.info(" After Modifier " + joinPoint.getSignature().getModifiers());
  }}
  </code></pre>
  
  <hr>
  
  <p>Find Controller package(com.framework.controller)<br>
  <strong>AuthenticationController.java</strong> </p>
  
  <pre><code>@Controller
  @RequestMapping("/authentication")
  public class AuthenticationController {
  
  @Autowired
  AuthenticationService authenticationService;
  
  @RequestMapping(value = "loginPage", method = RequestMethod.GET)
  public ModelAndView loginPage(HttpServletRequest request, HttpServletResponse response) {
      ModelMap map = new ModelMap();
      CustomLogger.info("Inside Login Page");
      return new ModelAndView("user.login", map);
  }
  
  @RequestMapping(value = "logout", method = RequestMethod.GET)
  public ModelAndView loginOut(HttpServletRequest request, HttpServletResponse response) {
      ModelMap map = new ModelMap();
      CustomLogger.info("Inside logout Page");
      return new ModelAndView("user.login", map);
  }
  
  @RequestMapping(value = "validateUser", method = RequestMethod.POST)
  public ModelAndView validateUser(HttpServletRequest request, HttpServletResponse response) {
      ModelMap map = new ModelMap();
      CustomLogger.info("Inside validate user Page");
      return new ModelAndView("user.dashboard", map);
  }
  }
  </code></pre>
  
  <hr>
  
  <p><strong>UserManagerController.java</strong></p>
  
  <pre><code>@Controller
  @RequestMapping("/userManager")
  public class UserManagerController {
  
  @Autowired
  UserManagerService userManagerService;
  
  @RequestMapping(value = "view", method = RequestMethod.GET)
  ModelAndView view(HttpServletRequest request, HttpServletResponse response) {
      ModelMap map = new ModelMap();
      CustomLogger.info("Inside User View Page");
      return new ModelAndView("user.manager.view", map);
  }
  
  @RequestMapping(value = "saveUser", method = RequestMethod.POST)
  ModelAndView saveUser(HttpServletRequest request, HttpServletResponse response) {
      ModelMap map = new ModelMap();
      CustomLogger.info("Inside Save User");
      return new ModelAndView("user.manager.view", map);
  }}
  </code></pre>
  
  <hr>
  
  <p><strong>Find below output i am getting</strong></p>
  
  <pre><code>below controller(FrameworkLoggingAspect) advise applying properly
  advise before for method loginPage
      INFO    2017-10-03 13:32:40,426 [http-nio-8080-exec-10] - com.framework.aspect.FrameworkLoggingAspect :  Before Name loginPage
      INFO    2017-10-03 13:32:40,426 [http-nio-8080-exec-10] - com.framework.aspect.FrameworkLoggingAspect :  Before Modifier 1
      INFO    2017-10-03 13:32:40,426 [http-nio-8080-exec-10] - com.framework.controller.AuthenticationController : Inside Login Page
  advise after for method loginPage
      INFO    2017-10-03 13:32:40,427 [http-nio-8080-exec-10] - com.framework.aspect.FrameworkLoggingAspect :  After Name loginPage
      INFO    2017-10-03 13:32:40,427 [http-nio-8080-exec-10] - com.framework.aspect.FrameworkLoggingAspect :  After Modifier 1
  advise before for method validateUser
      INFO    2017-10-03 13:33:15,292 [http-nio-8080-exec-6] - com.framework.aspect.FrameworkLoggingAspect :  Before Name validateUser
      INFO    2017-10-03 13:33:15,293 [http-nio-8080-exec-6] - com.framework.aspect.FrameworkLoggingAspect :  Before Modifier 1
      INFO    2017-10-03 13:33:15,293 [http-nio-8080-exec-6] - com.framework.controller.AuthenticationController : Inside validate user Page
  advise after for method validateUser
      INFO    2017-10-03 13:33:15,294 [http-nio-8080-exec-6] - com.framework.aspect.FrameworkLoggingAspect :  After Name validateUser
      INFO    2017-10-03 13:33:15,294 [http-nio-8080-exec-6] - com.framework.aspect.FrameworkLoggingAspect :  After Modifier 1
  
  but in this controller(UserManagerController) advise not applying
      INFO    2017-10-03 13:34:18,467 [http-nio-8080-exec-9] - com.framework.controller.UserManagerController : Inside User View Page
  </code></pre>
  
  <hr>
  
  <p>Please help me with this, I know this is silly question and already have lot of tutorial posted for that, but believe me I already go throw it but still I cant understand whats go wrong ?</p>