How to configure http tag in Spring Security 3.1?

I have a problem with my file spring-security.xml. I would like to configure some session parameters and first of all create a registration form to support guests and login.

This is my headline spring-security.xml:

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

As you can see, I use Spring Security in the latest version - 3.1. When I try to change the circuit version below, I have errors. As for version 3.1, I only have yellow warnings in Eclipse.

My tag httplooks like this:

<security:http auto-config='true'>      
    <security:intercept-url pattern="/wellcome*" access="ROLE_USER"  />
    <security:form-login login-page="/login" default-target-url="/wellcome" authentication-failure-url="/loginfailed"  />
    <security:logout logout-success-url="/logout" />
    <security:session-management invalid-session-url="/invalidsession" />
</security:http>

And in the first line of this tag, I have a long list of warnings:

Multiple annotations found at this line:
- Method 'setAuthenticationEntryPoint' is marked deprecated [config set: SpringMVC/web-context]
- Method 'setSessionAuthenticationStrategy' is marked deprecated [config set: SpringMVC/web-
 context]
- Method 'setUserAttribute' is marked deprecated [config set: SpringMVC/web-context]
- Method 'setRequestCache' is marked deprecated [config set: SpringMVC/web-context]
- Method 'setKey' is marked deprecated [config set: SpringMVC/web-context]
- Method 'setSecurityContextRepository' is marked deprecated [config set: SpringMVC/web-context]

Additional information I also have one warning in the third line:

Method 'setLoginFormUrl' is marked deprecated [config set: SpringMVC/web-context]

, spring-security.xml http Spring Security 3.1?

+5
2

EDIT: ​​ Spring Security 3.1.2, , 3.1 3.1.1, .

:

. Spring STS Eclipse (. , URL).

, https://jira.springsource.org ( Spring , ).

+6
<beans:beans xmlns:beans="http://www.springframework.org/schema/beans"
    xmlns="http://www.springframework.org/schema/security"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
    xmlns:util="http://www.springframework.org/schema/util"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
        http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.1.xsd
        http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd">

<http auto-config="true" disable-url-rewriting="true" use-expressions="true"> 
        <form-login login-processing-url="/login"
            login-page="/login.html"
            default-target-url='/index.html'
            always-use-default-target='true'
/>

<logout logout-url="/logout" />
0

All Articles