title: how to add @secure annotation in spring security
body: <p>how to add @Secure annoatation in controller's method and make it run?
  Now when I run it the got the exception like :</p>
  
  <blockquote>
    <p>org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'companyController' defined in file [C:\workspace\sts\springsource\vfabric-tc-server-developer-2.6.1.RELEASE\spring-insight-instance\wtpwebapps\BillingEngine\WEB-INF\classes\com\sesami\common\management\web\controller\CompanyController.class]: Initialization of bean failed; nested exception is org.springframework.aop.framework.AopConfigException: Unexpected AOP exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor#0': Cannot resolve reference to bean 'accessDecisionManager' while setting bean property 'accessDecisionManager'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'accessDecisionManager' is defined
    org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4723)
        at org.apache.catalina.core.StandardContext$1.call(StandardContext.java
        at java.lang.Thread.run(Unknown Source)
    Caused by: org.springframework.aop.framework.AopConfigException: Unexpected AOP exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor#0': Cannot resolve reference to bean 'accessDecisionManager' while setting bean property 'accessDecisionManager'; nested exception is at     ... 19 more</p>
  </blockquote>
  
  <p><strong><em>I have spring security .xml</em></strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans:beans xmlns:context="http://www.springframework.org/schema/context"
      xmlns="http://www.springframework.org/schema/security" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:beans="http://www.springframework.org/schema/beans"
      xsi:schemaLocation="http://www.springframework.org/schema/beans
          http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
          http://www.springframework.org/schema/security
          http://www.springframework.org/schema/security/spring-security-3.0.xsd"&gt;
  
  &lt;global-method-security secured-annotations="enabled"&gt;
  &lt;!-- 
  &lt;protect-pointcut access="ROLE_ADMIN"
          expression="execution(* com.sesami.common.management.web.controller.AdminController.*(..))" /&gt;
           --&gt;
  &lt;/global-method-security&gt;
  
  &lt;!-- URL pattern based security --&gt;
  &lt;http auto-config="false" entry-point-ref="authenticationEntryPoint"
      use-expressions="true"&gt;
      &lt;custom-filter ref="authenticationFilter" position="FORM_LOGIN_FILTER" /&gt;
      &lt;intercept-url access="hasRole('ROLE_ADMIN')" pattern="/common/admin/**" /&gt;
      &lt;intercept-url pattern="/common/accounting/**" access="hasRole('ROLE_USER')" /&gt;
      &lt;intercept-url pattern="/common/billing/**" access="hasRole('ROLE_COMPANY')" /&gt;
      &lt;logout logout-success-url="/" logout-url="/logout"/&gt;
  
  &lt;/http&gt;.........
  </code></pre>
  
  <p></p>
  
  <p>And in controller i add like this</p>
  
  <pre><code>@Secure("ROLE_ADMIN")
  @RequestMapping(value = "/common/admin/addAdmin", method = RequestMethod.GET)
      public String add(ModelMap map) {
          map.addAttribute(new Administrator());
          return "/common/admin/addAdmin";
      }
  </code></pre>
  
  <p>Do i need to config or import some class?</p>