我解决它通过使用
@PreAuthorize("authentication.name == #userId"),而不是@Secured(value ={"userid"})或@Secured(value = {"#userid"})类似建议,那些没有工作。注意,有必要添加
<security:global-method-security pre-post-annotations="enabled"/>到servlet上下文配置文件中。

我解决它通过使用
@PreAuthorize("authentication.name == #userId"),而不是@Secured(value ={"userid"})或@Secured(value = {"#userid"})类似建议,那些没有工作。注意,有必要添加
<security:global-method-security pre-post-annotations="enabled"/>到servlet上下文配置文件中。