title: Spring AOP Advice is being executed twice
body: <p>I am using Spring AOP to create an Aspect. The Aspect that I defined is being executed twice. I can't seem to figure out why. I'd appreciate any inputs anyone has on this issue. </p>
  
  <p>Thanks!</p>
  
  <p>// Spring Configuration</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans xmlns="http://www.springframework.org/schema/beans"
      xmlns:context="http://www.springframework.org/schema/context"
      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-3.0.xsd
      http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
      http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd"
      default-autowire="no"
      default-lazy-init="true"&gt;
  
      &lt;bean id="loggingAdvice" class="com.xyz.aop.LoggingAdvice" /&gt;
      &lt;aop:config&gt;
          &lt;aop:aspect id="loggingAspect" ref="loggingAdvice"&gt;
              &lt;aop:pointcut id="loggingPointcut"
                  expression="execution(* com.xyz.FooServiceImpl.foo(..))"/&gt;
                  &lt;aop:around pointcut-ref="loggingPointcut" method="log" /&gt;
          &lt;/aop:aspect&gt;
      &lt;/aop:config&gt;
  
      &lt;context:component-scan base-package="com.xyz.controllers" /&gt;
  
  &lt;/beans&gt;
  </code></pre>
  
  <p>// Advice</p>
  
  <pre><code>package com.xyz.aop;
  
  import org.apache.commons.logging.Log;
  import org.apache.commons.logging.LogFactory;
  import org.aspectj.lang.ProceedingJoinPoint;
  
  public class LoggingAdvice {
      public Object log(final ProceedingJoinPoint pjp) throws Throwable {
          log.info("Started!");
          try {
              return pjp.proceed();
          } finally {
              log.info("Ended!");
          }
      }
  }
  </code></pre>
  
  <p>// Advised Method</p>
  
  <pre><code>package com.xyz;
  
  import org.apache.commons.logging.Log;
  import org.apache.commons.logging.LogFactory;
  
  public class FooServiceImpl implements FooService {
      private static final Log log = LogFactory.getLog(FooServiceImpl.class);
  
      @Override
      public void foo()  {
           log.info("Foo!");
          }
      }
  }
  </code></pre>
  
  <p>// Output</p>
  
  <pre><code>   Started!
     Started!
     Foo!
     Ended!
     Ended!
  </code></pre>
  
  <p>// EDIT 1: Added more spring configuration info. Not using any Spring AOP annotations at all. I attached a debugger and saw that the aspect/log statements were being executed twice as well. So I doubt that it has anything to do with log statement printing the string twice.</p>