In Spring Security, to apply method security, one needs to enable it using the _____ annotation on a configuration class.
- @EnableGlobalMethodSecurity
- @EnableMethodProtection
- @MethodSecurity
- @SecuredMethod
To enable method-level security in Spring Security, you need to use the @EnableGlobalMethodSecurity annotation on a configuration class. It's used to activate annotations like @Secured, @PreAuthorize, etc., for method-level security.
Loading...
Related Quiz
- Which Spring Boot feature is commonly used to automate the database schema creation and update process?
- You are developing a Spring Boot application that needs to interact with multiple databases. How would you design the data source configuration and connection pooling to ensure optimal performance and maintainability?
- For custom authentication logic in Spring Security, developers can create a bean of type _____.
- For creating custom auto-configuration in Spring Boot, the configuration class needs to be listed in the _____ file.
- You are assigned to implement Two-Factor Authentication in a Spring Security application. How would you approach this task, considering Spring Security configurations and components?