spring security - expiredUrl not working

后端 未结 4 2166
旧时难觅i
旧时难觅i 2021-01-31 21:06

I need to configure expired-url in my Spring MVC application. Here is my effort, but has no effect:

@Override
protected void configure(HttpSecurity          


        
4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-31 22:09

    I tried the Ali Dehghani's solution(in the comments) in this way:

    .sessionManagement().maximumSessions(1).and().invalidSessionUrl("/expired");
    

    And as The Coder said, add "/expired" in the permitted urls and the problem solved. Thank you everybody who has paid attention to my problem, especially Ali Dehghani and The Coder, for their useful comments.

提交回复
热议问题