title: Are annotation pattern pointcuts supported in spring framework 4.1.6?
body: <p>I have the following spring REST controller:</p>
  
  <pre><code>@RestController
  public class QuoteController {
  
      @RequestMapping(value = {"/quotes"}, method = RequestMethod.GET)
      public String getQuotes(@PathVariable("accountId") String accountId)
              throws Exception {
  
          return "100.00";
      }
  
  }
  </code></pre>
  
  <p>and the following aspect and context config files:</p>
  
  <pre><code>@Component
  @Aspect
  public class TestControllerAspect {
  
      @Around("execution(@org.springframework.web.bind.annotation.RequestMapping public * com.test.controller..*.*(..))")
      public Object controllerAroundAdvice(ProceedingJoinPoint joinPoint) throws Throwable {
          Object[] args = joinPoint.getArgs();
          for (Object o : joinPoint.getArgs()) {
              System.out.println(o.toString());
          }
          return joinPoint.proceed();
      }
  }
  
  @Configuration
  @ComponentScan("com.test.controller")
  @EnableWebMvc
  @EnableCaching
  @EnableAspectJAutoProxy
  public class WebConfig extends WebMvcConfigurerAdapter {
  
      @Bean
      public TestControllerAspect controllerAspect() {
          return new TestControllerAspect();
      }
  }
  </code></pre>
  
  <p>When I deploy this code in JBoss EAP 6, I get the following error from spring framework:</p>
  
  <p>Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: error annotation type patterns are only supported at Java 5 compliance level or above.</p>
  
  <p>I have tried the above pointcut using @annotation but received similar error. There were similar posts in stackoverflow about these errors but they were referring to an older version of spring and aspectj weaver jars. I am using spring 4.1.6 which I believe already repackages aspectj classes with spring.</p>
  
  <p>Did anyone else encounter this error. By the way, I am using java 1.8.
  Appreciate the response.</p>