To enable global method security in Spring Security, the _____ attribute should be set to true in the @EnableGlobalMethodSecurity annotation.
- jsr250Enabled
- prePostEnabled
- roleHierarchyEnabled
- securedEnabled
To enable global method security in Spring Security, you should set the prePostEnabled attribute to true in the @EnableGlobalMethodSecurity annotation. This enables the use of @PreAuthorize and @PostAuthorize annotations for method-level security.
Loading...
Related Quiz
- What does the @ExceptionHandler annotation do in a Spring Boot application?
- Suppose you are working on a Spring Boot project and need to ensure that certain fields in the incoming request payload are consistent with each other (e.g., startDate should be before endDate). How would you implement this validation?
- The process of creating a JWT token in Spring Boot is known as _____.
- repository extends the CrudRepository to provide additional methods to retrieve entities using the pagination and sorting abstraction in Spring Data JPA?
- How can you clear or evict a cached value in a Spring Boot application?