config/src/main/java/org/springframework/security/config/annotation/method/configuration/GlobalMethodSecurityConfiguration.java
protected AccessDecisionManager accessDecisionManager() {
		List<AccessDecisionVoter<? extends Object>> decisionVoters = new ArrayList<AccessDecisionVoter<? extends Object>>();
		ExpressionBasedPreInvocationAdvice expressionAdvice = new ExpressionBasedPreInvocationAdvice();
		expressionAdvice.setExpressionHandler(getExpressionHandler());
		if (prePostEnabled()) {
			decisionVoters
					.add(new PreInvocationAuthorizationAdviceVoter(expressionAdvice));
		}
		if (jsr250Enabled()) {
			decisionVoters.add(new Jsr250Voter());
		}
		RoleVoter roleVoter = new RoleVoter();
		GrantedAuthorityDefaults grantedAuthorityDefaults =
				getSingleBeanOrNull(GrantedAuthorityDefaults.class);
		if (grantedAuthorityDefaults != null) {
			roleVoter.setRolePrefix(grantedAuthorityDefaults.getRolePrefix());
		}
		decisionVoters.add(roleVoter);
		decisionVoters.add(new AuthenticatedVoter());
		return new AffirmativeBased(decisionVoters);
	}
protected AccessDecisionManager accessDecisionManager() {
		List<AccessDecisionVoter<? extends Object>> decisionVoters = new ArrayList<AccessDecisionVoter<? extends Object>>();
		ExpressionBasedPreInvocationAdvice expressionAdvice = new ExpressionBasedPreInvocationAdvice();
		expressionAdvice.setExpressionHandler(getExpressionHandler());
		if (prePostEnabled()) {
			decisionVoters
					.add(new PreInvocationAuthorizationAdviceVoter(expressionAdvice));
		}
		if (jsr250Enabled()) {
			decisionVoters.add(new Jsr250Voter());
		}
		RoleVoter roleVoter = new RoleVoter();
		GrantedAuthorityDefaults grantedAuthorityDefaults =
				getSingleBeanOrNull(GrantedAuthorityDefaults.class);
		if (grantedAuthorityDefaults != null) {
			roleVoter.setRolePrefix(grantedAuthorityDefaults.getRolePrefix());
		}
		decisionVoters.add(roleVoter);
		decisionVoters.add(new AuthenticatedVoter());
		return new AffirmativeBased(decisionVoters);
	}
protected AccessDecisionManager accessDecisionManager ( ) { List < AccessDecisionVoter < ? extends Object > > decisionVoters = new ArrayList < AccessDecisionVoter < ? extends Object > > ( ) ; ExpressionBasedPreInvocationAdvice expressionAdvice = new ExpressionBasedPreInvocationAdvice ( ) ; expressionAdvice . setExpressionHandler ( getExpressionHandler ( ) ) ; if ( prePostEnabled ( ) ) { decisionVoters . add ( new PreInvocationAuthorizationAdviceVoter ( expressionAdvice ) ) ; } if ( jsr250Enabled ( ) ) { decisionVoters . add ( new Jsr250Voter ( ) ) ; } RoleVoter roleVoter = new RoleVoter ( ) ; GrantedAuthorityDefaults grantedAuthorityDefaults = getSingleBeanOrNull ( GrantedAuthorityDefaults . class ) ; if ( grantedAuthorityDefaults != null ) { roleVoter . setRolePrefix ( grantedAuthorityDefaults . getRolePrefix ( ) ) ; } decisionVoters . add ( roleVoter ) ; decisionVoters . add ( new AuthenticatedVoter ( ) ) ; return new AffirmativeBased ( decisionVoters ) ; }
Allows subclasses to provide a custom {@link AccessDecisionManager}. The default is
a {@link AffirmativeBased} with the following voters:

<ul>
<li>{@link PreInvocationAuthorizationAdviceVoter}</li>
<li>{@link RoleVoter}</li>
<li>{@link AuthenticatedVoter}</li>
</ul>

@return the {@link AccessDecisionManager} to use
Allows subclasses to provide a custom { @link AccessDecisionManager } . The default is a { @link AffirmativeBased } with the following voters :