Wyłącz Spring Security z pliku spring-security.xml

Pomóż mi z radą.

Muszę wyłączyć / włączyć zabezpieczenie sprężynowe na mojej aplikacji przez jakąś zmienną w pliku xml.

mój plik spring-security.xml

<beans:beans xmlns="http://www.springframework.org/schema/security"
xmlns:beans="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-3.1.xsd">

<http auto-config="true">
    <intercept-url pattern="/*" access="ROLE_ADMIN" />
    <logout logout-success-url="/mainpage" />
            <login login-success-url="/mainpage" />
</http>

<authentication-manager>
    <authentication-provider>
        <user-service>
            <user name="hey" password="there" authorities="ROLE_ADMIN" />
        </user-service>
    </authentication-provider>
</authentication-manager>

Jak można to zrobić? Dzięki.

questionAnswers(1)

yourAnswerToTheQuestion