次のように HTTPS でサイトにアクセスするたびに、フィルターが適用されない理由を理解するのに問題がありますhttps://localhost:8443/initiator
。したがって、認証されていないユーザーのログイン ページに正しくリダイレクトされません。を使用してアクセスした場合、正常にhttp://localhost:8080/initiator
機能しています。
Web アプリケーションに非常に単純な Spring セキュリティ構成を使用しています。以下に示すように、すべてのリンクを SSL にしたいと考えています。
<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.1.xsd
http://www.springframework.org/schema/security
http://www.springframework.org/schema/security/spring-security-3.1.xsd">
<http auto-config="false" >
<intercept-url pattern="/**" requires-channel="https"/>
<intercept-url pattern="/initiator*" access="ROLE_USER" />
<!-- Other configuration here like the logout, login, etc-->
</http>
</beans>
Spring Security バージョン 3.1.3.RELEASE を使用しています。http の場合はすべて正常に動作することに注意してください。httpsにすると動かなくなりました。
どうもありがとうございました。