Reputation: 411
I'm trying to use @PreAuthorize("hasAuthority('READ'), hasRole('ADMIN')")
that throws parsing exception.
How can I use hasAuthority
and hasRole
with @PreAuthorize
in Spring boot controller?
Upvotes: 0
Views: 1146
Reputation: 411
This worked as
@PreAuthorize("hasAuthority('READ') and hasRole('ADMIN')")
Upvotes: 1