• Tutorials
  • Courses
  • Tracks

Question 2

Last Updated :
Discuss
Comments

Which annotation is used to restrict access to a method to users with a specific role?

@RequestMapping

@PreAuthorize("hasRole('ADMIN')")

@EnableWebSecurity

@SecuredOnly

Share your thoughts in the comments