spring security redirects to last requested page after login session timeout

前端 未结 2 1686
盖世英雄少女心
盖世英雄少女心 2021-02-09 18:05

I have implemented spring security for login to my web portal. It works fine except for one issue. I have set session timeout to 5 min. Once timeout happpens and then user click

2条回答
  •  萌比男神i
    2021-02-09 18:22

    Add the always-use-default-target attribute to your form-login tag.

    
    

    If set to true, the user will always start at the value given by default-target-url, regardless of how they arrived at the login page. Maps to the alwaysUseDefaultTargetUrl property of UsernamePasswordAuthenticationFilter. Default value is false.

提交回复
热议问题