title: Spring AOP adviced methods do not work. My configuration seems ok
body: <p>I'm trying to create a demo AOP application but it just does not work right.
  I read through all tutorials and got it working with <code>@RestController</code> but as I tried it with a plain java spring driven application I just can't get it to work. Please review my files and tell me where my mistake lies in.</p>
  
  <p><strong>Application Class</strong></p>
  
  <pre><code>@SpringBootApplication
  @ComponentScan("com.xetra.experimental")
  @EnableAspectJAutoProxy
  public class AoptryoutnowebApplication {
  
    public static void main(String[] args) {
      SpringApplication.run(AoptryoutnowebApplication.class, args);
      DefaultClassToAspectImpl defaultClassToAspectImpl = new DefaultClassToAspectImpl();
      defaultClassToAspectImpl.doStuff();
    }
  }
  </code></pre>
  
  <p><strong>ClassToAspect Interface</strong></p>
  
  <pre><code>public interface ClassToAspect {
    void doStuff();
  }
  </code></pre>
  
  <p><strong>ClassToAspect Implementation</strong></p>
  
  <pre><code>@Component
  public class DefaultClassToAspectImpl implements ClassToAspect {
    @FooAnnotation
    public void doStuff(){
      System.out.println("DoStuff!");
    }
  }
  </code></pre>
  
  <p><strong>Annotation for Pointcut</strong></p>
  
  <pre><code>public @interface FooAnnotation {
  }
  </code></pre>
  
  <p><strong>Aspect Class</strong></p>
  
  <pre><code>@Aspect
  public class FooAspect {
  
    @Pointcut("@annotation(FooAnnotation)")
    public void methods(){
    }
  
    @Before("methods()")
    public void doAspect(){
      System.out.println("FooAspect before");
    }
  }
  </code></pre>