title: AOP using AspectJ not working in spring?
body: <p>My Aspect class will be , </p>
  
  <pre><code>@Configuration
  @EnableAspectJAutoProxy
  @Component
  @Aspect
  public class AspectClass {
  
      @Before("execution(* com.pointel.aop.test1.AopTest.beforeAspect())")
      public void logBefore(JoinPoint joinPoint) {
  
          System.out.println("Before running the beforeAspect() in the AopTest.java class!");
          System.out.println("Hijacked Method name : " + joinPoint.getSignature().getName());
          System.out.println("************************");
      }
  
  }
  </code></pre>
  
  <p>My other java Class</p>
  
  <pre><code>public class AopTest {
  
      public void beforeAspect() {
          System.out.println("This is beforeAspect() !");
      }
  }
  </code></pre>
  
  <p>My Main Class is</p>
  
  <pre><code>public class MainMethod {
  
      public static void main(String[] args) {    
          ApplicationContext context = new FileSystemXmlApplicationContext("ApplicationContext/applicationContext.xml");
          AopTest test = (AopTest)context.getBean("bean1");
          test.beforeAspect();
      }
  }
  </code></pre>
  
  <p>My applicationContext.xml is ,</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-3.0.xsd 
      http://www.springframework.org/schema/aop 
      http://www.springframework.org/schema/aop/spring-aop-3.0.xsd "&gt;
  
      &lt;bean id="bean1" class="com.pointel.aop.test1.AopTest" /&gt;
  
  &lt;/beans&gt;
  </code></pre>
  
  <p>In this the <code>@Before("execution(* com.pointel.aop.test1.AopTest.beforeAspect())")</code> in the <code>AspectClass</code> will not be executed before the <code>beforeAspect()</code> in the <code>AopTest</code> , when running Main method.</p>
  
  <p>Good answers are definitely appreciated.</p>