@PreAuthorize with hasRole it works fine.hasPermission, it doesn't work.Please read the article on the following site: http://springinpractice.com/2010/10/27/quick-tip-spring-security-role-based-authorization-and-permissions/
The main thing is you will need to implement the UserDetails interface. It says "the UserDetails interface simply exposes the permissions (not the roles) via the getAuthorities() method"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With