title: Spring AOP Configuration (XML)
body: <p>I am experimenting with Spring AOP for the first time and get stuck in the XML configuration. I'm trying to get a mock version of AOP-based "logging" up and running, using a <code>MethodInterceptor</code> to wrap specific method calls and do some simple <code>System.out.println</code> statements before and after those method invocations. Simple stuff, right?</p>
  
  <p>So my project has many classes, two of them are <code>Fizz</code> and <code>Buzz</code>. Fizz has a method named <code>foo()</code> and Buzz has a method named <code>wapap()</code>. Every time these methods are invoked at runtime, I want my <code>LoggingInterceptor</code> to execute its invoke() method around them:</p>
  
  <pre><code>public class LoggingInterceptor implements MethodInterceptor
  {
      public Object invoke(MethodInvocation methodInvocation)
      {
          try
          {
              System.out.println("About to call a special method.");
              Object result = methodInvocation.proceed();
              return result;
          }
          finally
          {
              System.out.println("Finished executing the special method.");
          }
      }
  }
  </code></pre>
  
  <p>So I understand the concepts of advice (my interceptor impl), pointcuts (the methods that will have advice executed around them), and pointcut advisors (bindings between advice and pointcuts).</p>
  
  <p>I'm just struggling tying it altogether in a simple XML config.</p>
  
  <p>Here's what I have so far, but I know it's missing pointcut and pointcut advisor definitions, and possibly more.</p>
  
  <pre><code>&lt;beans default-autowire="no" &gt;
      &lt;bean name="loggingInterceptor" class="org.me.myproject.aop.LoggingInterceptor"/&gt;   
  &lt;/beans&gt;
  </code></pre>
  
  <p><strong>What am I missing here to make this specific to Fizz::foo() and Buzz::wapap() calls?</strong></p>
  
  <p>Any nudges in the right direction are enormously appreciated!</p>