title: Can you use SpEL in @PreAuthorize referencing a instance property?
body: <p>Is there a way to use a local variable in a class (authorizedRoles below), that is set with all the roles to grant access to an endpoint for the hasAnyRole value? For example, I want to have a list of roles, defined in a config, and populate the hasAnyRole in @PreAuthorize like so:</p>
  
  <pre><code>@Controller("myController")
  public class MyController {
  private String authorizedRoles;
  
  @Autowired
  public MyController(ObjectMapper objectMapper, @Value("#{'${security.authorized-roles}'.split(',')}") String authorizedRoles) {
      this.objectMapper = objectMapper;
      this.request = request;
      this.authorizedRoles = authorizedRoles;
  }
  
  @RequestMapping(value = "/id", produces = { "application/json" }, consumes = { "application/json" }, method = RequestMethod.POST)
  @PreAuthorize("hasAnyRole('#myController.authorizedRoles')")
  public ResponseEntity&lt;IdResponse&gt; idPost(@RequestBody IdRequest body) {
    ...
  }
  </code></pre>