1.

In Which Security Annotation Are You Allowed To Use Spel?

Answer»

They are @PreAuthorize, @PreFilter, @PostAuthorize and @PostFilter. These annotations support expression attributes to allow pre and post-invocation AUTHORIZATION checks and also to support filtering of SUBMITTED COLLECTION arguments or return values

Method security is a bit more complicated than a SIMPLE allow or deny rule. Spring Security 3.0 INTRODUCED some new annotations in order to allow comprehensive support for the use of expressions.

<global-method-security pre-post-annotations="enabled"/>

@PreAuthorize("hasRole('USER')")

public void create(Contact contact); 

They are @PreAuthorize, @PreFilter, @PostAuthorize and @PostFilter. These annotations support expression attributes to allow pre and post-invocation authorization checks and also to support filtering of submitted collection arguments or return values

Method security is a bit more complicated than a simple allow or deny rule. Spring Security 3.0 introduced some new annotations in order to allow comprehensive support for the use of expressions.

<global-method-security pre-post-annotations="enabled"/>

@PreAuthorize("hasRole('USER')")

public void create(Contact contact); 



Discussion

No Comment Found