<?xml version="1.0" encoding="UTF-8"?>

<b:beans xmlns="http://www.springframework.org/schema/security"
    xmlns:b="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security.xsd">

    <b:bean class='org.springframework.beans.factory.config.PropertyPlaceholderConfigurer'/>

    <b:bean id="target" class="org.springframework.security.config.TestBusinessBeanImpl">
        <!-- This will add a security interceptor to the bean -->
        <intercept-methods>
            <protect method="org.springframework.security.config.TestBusinessBean.set*" access="${admin.role}" />
            <protect method="get*" access="${admin.role},ROLE_USER" />
            <protect method="doSomething" access="ROLE_USER" />
        </intercept-methods>
    </b:bean>

    <authentication-manager>
        <authentication-provider>
            <user-service>
                <user name="bob" password="bobspassword" authorities="ROLE_A,ROLE_B" />
                <user name="bill" password="billspassword" authorities="ROLE_A,ROLE_B,AUTH_OTHER" />
            </user-service>
        </authentication-provider>
    </authentication-manager>

</b:beans>
