У меня проблема с моим файлом spring-security.xml
. Я хотел настроить некоторые параметры сеанса и, прежде всего, создать форму входа для обслуживания гостей и зарегистрированных пользователей.
Это мой 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">
Как видите, я использую Spring Security в последней версии -3.1. Когда я пытаюсь изменить версию схемы на более низкую, у меня возникают ошибки. Что касается версии 3.1, у меня в Eclipse только желтые предупреждения.
Мой тег http
выглядит как:
<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>
И в первой строке этого тега у меня длинный список предупреждений:
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]
Кроме того, у меня также есть одно предупреждение в третьей строке:
Method 'setLoginFormUrl' is marked deprecated [config set: SpringMVC/web-context]
Не могли бы вы объяснить мне, как мне правильно определить мой файл spring-security.xml
с тегом http
в Spring Security 3.1?