I\'m trying to access a bean reference in a @PreAuthorize annotation as follows:
@PreAuthorize(\"@testBean.getTestValue()\")
public String testSpEL() {
.
For anyone stuck on Spring Security 3.0.x I have a somewhat simple workaround. Add this class in your application-securityContext.xml (or whatever):
https://gist.github.com/3340059
It injects a BeanFactoryResolver into the Spring Security code, which is all the Spring Security 3.1.x fix has. Support for the syntax is already in 3.0.x. It allows you to use the syntax from 3.1.x, ala:
@PreAuthorize("@controller.theProperty")