Which annotation is used in Spring Security to secure methods based on role-based conditions?

  • @Permission
  • @PostAuthorize
  • @PreAuthorize
  • @Secured
The @Secured annotation in Spring Security is used to secure methods based on role-based conditions. You can specify the required roles in the annotation, and only users with those roles can access the method.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *