title: How to create custom methods for use in spring security expression language annotations
body: <p>I would like to create a class that adds custom methods for use in spring security expression language for method-based authorization via annotations.</p>
  
  <p>For example, I would like to create a custom method like 'customMethodReturningBoolean' to be used somehow like this:</p>
  
  <pre><code>  @PreAuthorize("customMethodReturningBoolean()")
    public void myMethodToSecure() { 
      // whatever
    }
  </code></pre>
  
  <p>My question is this.
  If it is possible, what class should I subclass to create my custom methods, how would I go about configuring it in the spring xml configuration files and come someone give me an example of a custom method used in this way?</p>