How to set redirection after successful login?
<p>I am using spring boot with the spring-boot-starter-security dependency. </p>

<p>I have an application that will successfully login given the proper credentials. However, whenever I login I am not being redirected anywhere. How can I configure this? </p>

<p>Below is the form:</p>

<pre><code> &lt;form th:action="@{/login}" method="post"&gt;
        &lt;div&gt;&lt;label&gt; User Name : &lt;input type="text" name="username"/&gt; &lt;/label&gt;&lt;/div&gt;
        &lt;div&gt;&lt;label&gt; Password: &lt;input type="password" name="password"/&gt; &lt;/label&gt;&lt;/div&gt;
        &lt;div&gt;&lt;input type="submit" value="Sign In"/&gt;&lt;/div&gt;
 &lt;/form&gt;
</code></pre>

<p>I have tried changing the th:action tag above but I wasn't able to get anywhere with it. </p>

<p>The MvcConfig method is below: </p>

<pre><code>public void addViewControllers(ViewControllerRegistry registry) {
    registry.addViewController("/login").setViewName("login");
    registry.addViewController("/").setViewName("login");
}
</code></pre>