spring is not redirecting to default target url?

后端 未结 5 1638
滥情空心
滥情空心 2020-12-19 06:15

I am using spring security for authentication. authentication is working fine. but after authentication it is not redirecting to the html that have mentioned using default t

5条回答
  •  心在旅途
    2020-12-19 07:07

    If a user is sent to the login page after requesting a protected resource, they will be sent to the originally requested page after successful login. The default-target-url will only be used if the user logged in without requesting a protected resource first (i.e. they navigated directly to the login page). If you always want to go to the default-target-url you can specify always-use-default-target="true" as shown in the example below

    
    

提交回复
热议问题