To enable method-level security in Spring Security, the _____ annotation must be added to the configuration class.

  • @Autowired
  • @EnableGlobalMethodSecurity
  • @PreAuthorize
  • @Secured
To enable method-level security in Spring Security, the @EnableGlobalMethodSecurity annotation must be added to the configuration class. This annotation allows you to use method-level security annotations like @PreAuthorize, @Secured, and others to control access to specific methods in your application. It's a crucial step in implementing fine-grained security control.
Add your answer
Loading...

Leave a comment

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