title: How to implement annotation based security using Spring AOP?
body: <p>I'm new to Spring AOP (and AOP in general), need to implement the following:</p>
  
  <pre><code>@HasPermission(operation=SecurityOperation.ACTIVITY_EDIT, object="#act")
  public Activity updateActivity(Activity act)
  {
     ...
  }
  </code></pre>
  
  <p>@HasPermission is my custom annotation, which will be used to mark all methods requiring pre-authorization. I'm using my custom implementation of security checks based on Apache Shiro. Generally, I guess that I will need to define pointcut which matches all annotated methods and also provide implementation of the aspect (either before or around). </p>
  
  <p>Questions I have are re. aspect implementation. </p>
  
  <ul>
  <li>How do I extract <em>operation</em> and <em>object</em> parameters from the annotation?</li>
  <li>How can I resolve SpEL expression in object definition and get object passed as 'act' parameter?</li>
  </ul>