title: How to get Spring Security to not bypass a controller login mapping?
body: <p>If login.jsp posts to <code>/login/submit</code>:</p>
  
  <pre><code>&lt;form action="/login/submit" method="post"&gt;
  </code></pre>
  
  <p>and the <code>applicationContext.xml</code> defines a <code>form-login</code> element:</p>
  
  <pre><code>&lt;form-login login-page="/login" login-processing-url="/login/submit" authentication-failure-url="/login/error" /&gt;   
  </code></pre>
  
  <p><strong>How do I do some additional handling in a corresponding controller method:</strong></p>
  
  <pre><code>@RequestMapping(value = "/login/submit", method = RequestMethod.POST)
  </code></pre>
  
  <p><em>I defined such a method but Spring Security never calls it when the <code>login.jsp</code> posts its form.</em> Instead it calls <code>loadUserByUsername</code> and handles the authentication successfully without using this controller method.</p>