質問のタイトルはそれ自体を物語っています。
home.xhtml とクリーンな URL /Home の両方を保護したいと考えています。
春のセキュリティ設定では、次のことを行う必要がありますか、それとも別の方法がありますか?
<security:http auto-config="true" use-expressions="true">
<security:intercept-url pattern="/home.xhtml" access="isAuthenticated()" />
<security:intercept-url pattern="/Home" access="isAuthenticated()" />
</security:http>
ありがとう
アップデート :
実際、私の解決策は、ファイルと URL 名に注意することです。より一貫性を持たせるために、春のセキュリティ ファイルでこれを行います。
<security:intercept-url pattern="/Home*" access="isAuthenticated()" />
これにより、2 つの URL が保護されます...実際にはすべての URL が Home で始まります (大文字と小文字は区別されません)。