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.
Loading...
Related Quiz
- The _____ endpoint in OAuth2 is used by the client to obtain an access token.
- For creating custom auto-configuration in Spring Boot, the configuration class needs to be listed in the _____ file.
- What considerations should be taken into account when choosing between Flyway and Liquibase for a large-scale, complex Spring Boot application?
- You are tasked with developing a Spring Boot application using Spring Data JPA, where ensuring the consistency of the data is crucial. How would you manage the transactions in the application to ensure the integrity and consistency of the data?
- To configure the cache storage type, like in-memory or external, in Spring Boot, the _____ property is used.