春のセキュリティは初めてです。私はこのチュートリアルに従っていました
http://www.mkyong.com/spring-security/spring-security-form-login-example/
ウェルカム ページをリクエストすると、ログイン フォームにリダイレクトされ、資格情報を入力するとウェルカム ページが表示されます。 /welcome ログインを要求しません。セッションに関連していると思いますが、これを解決する方法がわかりません。delete-cookies="JSESSIONID" も使用しましたが、機能していません。
ユーザーがログアウトしてウェルカムURLを再度ヒットしたときに、認証が必要なため、ウェルカムページではなくログインフォームに誘導する必要があります。すぐに助けが必要です私のセキュリティxmlは次のとおりです
<?xml version="1.0" encoding="UTF-8"?>
<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.0.3.xsd">
<http auto-config="true">
<intercept-url pattern="/welcome*" access="ROLE_USER" />
<form-login login-page="/login" default-target-url="/welcome"
authentication-failure-url="/loginfailed" />
<logout
logout-success-url="/logout" />
</http>
<authentication-manager>
<authentication-provider>
<user-service>
<user name="mkyong" password="123456" authorities="ROLE_USER" />
</user-service>
</authentication-provider>
</authentication-manager>
</beans:beans>