问题一
<beans:bean id="accessDecisionManager"
class="org.springframework.security.access.vote.AffirmativeBased">
<beans:property name="allowIfAllAbstainDecisions" value="false" />
<beans:property name="decisionVoters">
<beans:list>
<beans:bean class="org.springframework.security.access.vote.RoleVoter" />
<beans:bean class="org.springframework.security.access.vote.AuthenticatedVoter" />
</beans:list>
</beans:property>
</beans:bean>
不明白AffirmativeBased 和 decisionVoters还有decisionVoters之间的关系问题二
org.springframework.security.authenticationManager 和问题一中的AffirmativeBased 又有什么关系 还是没有关系 谢谢高手帮忙

解决方案 »

  1.   

    认证(Authentication )被储存在一组GrantedAuthority中。
    而GrantedAuthority被加入到AuthenticationManager里,然后被accessDecisionManager读取。accessDecisionManager 有三种。
    AffirmativeBased: 任意一个voter同意即可。
    UnanimousBased:所有voter都同意才行。
    ConsensusBased:需要多数voter同意。这个比例可以自己定义。AffirmativeBased 拥有属性decisionVoters。在decisionVoters里定义都包含哪些voter
      

  2.   

    可以来我的博客参考这security的项目实例