Spring Security 4 extending the custom filter
<p>To change the spring security filter I had below </p>

<pre><code>&lt;http auto-config="false" entry-point-ref="authenticationEntryPoint"&gt;
    &lt;custom-filter before="FORM_LOGIN_FILTER" ref="customPasswordAuthenticationFilter"/&gt; 
&lt;/http&gt;
</code></pre>

<p>But I want to change the <code>FORM_LOGIN_FILTER</code> so I prefer to use <code>position="FORM_LOGIN_FILTER"</code> but I get the error:</p>

<pre><code>Configuration problem: 
Filter beans '&lt;customUsernamePasswordAuthenticationFilter&gt;' and '&lt;org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter#0&gt;' have the same 'order' value. 
When using custom filters, please make sure the positions do not conflict with default filters. Alternatively you can disable the default filters by removing the corresponding child elements from &lt;http&gt; and avoiding the use of &lt;http auto-config='true'&gt;.
</code></pre>

<p>The document mentioned that:</p>

<blockquote>
  <p>Attribute : position The explicit position at which the custom-filter
  should be placed in the chain. Use if you are replacing a standard.</p>
</blockquote>