bikram
bikram

Reputation: 33

SpringSecurity : always redirect logged in users to a page

Spring security has a nice feature, it remembers the url of request resource and redirect users to that resource after authentication is successful. But I want users always redirected to some other page, just after user logs in. How is it done?

Upvotes: 3

Views: 770

Answers (1)

Pavel Rodionov
Pavel Rodionov

Reputation: 380

In your spring-security configuration use following:

<http>
        <form-login default-target-url='/some/other/page' always-use-default-target="true"/>
</http>

Upvotes: 4

Related Questions