title: Enum in SpEL for grails spring security annotation?
body: <p>Assuming a grails (v2.3.x) custom class created and setup in a way that mimics the java way outlined by @JamesWatkins <a href="https://stackoverflow.com/questions/6632982/how-to-create-custom-methods-for-use-in-spring-security-expression-language-anno">in this post</a>, it is simple to annotate a method with a static string:</p>
  
  <pre><code>@Secured(["@mySecurityService.hasPermission('special')"])
  public void doSpecialStuff() { ... }
  </code></pre>
  
  <p>But in an attempt to prevent hard-coding values, is it possible to replace <code>'special'</code> by  embedding a custom Enum (or similar) in the SpEL expression?  </p>
  
  <p>I have tried this:</p>
  
  <pre><code>@Secured(["@mySecurityService.hasPermission('{ T(com.example.MyConfig$MyEnum.SPECIAL) }')"])
  public void doSpecialStuff() { ... }
  </code></pre>
  
  <p>but I keep getting an exception about the string not being a constant:</p>
  
  <pre><code>Expected '@mySecurityService.hasPermission('{ T(com.example.MyConfig$MyEnum.SPECIAL) }')' to be an inline constant of type java.lang.String
  </code></pre>