添加角色权限
在SpringsecuritydemoApplication中添加

//启用Spring Security注解
@EnableGlobalMethodSecurity(securedEnabled = true)

controller方法类中
LoginController.java

@Secured("ROLE_abc")

位置截图: