title: @Order(SecurityProperties.ACCESS_OVERRIDE_ORDER) vs ManagementServerProperties.ACCESS_OVERRIDE_ORDER in Spring Security
body: <p><strong>Question1:</strong> In Spring Security, what exactly is the function </p>
  
  <p><code>@Order(SecurityProperties.ACCESS_OVERRIDE_ORDER)</code></p>
  
  <p>Spring Documentation States the below, but I am not sure I understand it clearly</p>
  
  <blockquote>
    <p>To override the access rules without changing any other autoconfigured features add a @Bean of type WebSecurityConfigurerAdapter with <code>@Order(SecurityProperties.ACCESS_OVERRIDE_ORDER)</code>.</p>
  </blockquote>
  
  <p>The ordering of various security features in Spring Security are as below as per my understanding (LowestValue i.e. Highest Precedence to Highest Value i.e. Lowest Precedence)</p>
  
  <ol>
  <li><code>Ordered.HIGHEST_PRECEDENCE</code> = -2^31-1</li>
  <li>WebSecurityConfigurerAdapter = 100 (Based on @Order(100) mentioned in Docs)
  
  <ol>
  <li><code>Access_Override_Order = Basic_Auth_Order -2</code> for <em>Security Properties</em></li>
  <li><code>Access_Override_Order = Basic_Auth_Order -1</code> for <em>ManagementServerProperties</em>
  <code>Basic_Auth_Order-2</code> = 2^31-7          </li>
  </ol></li>
  <li><code>Basic_Auth_Order = Ordered.Lowest_Precendence -5  = 2^31-5</code></li>
  <li><code>Ordered.LOWEST_PRECEDENCE = 2^31</code></li>
  </ol>
  
  <p><strong>Question2</strong>
  Based on the ordering of various security features above, If I want to override default rules for both Management Endpoints and the Rest of the application, should I use </p>
  
  <ul>
  <li>SecurityPropertiesACCESS_OVERRIDE_ORDER or </li>
  <li>ManagementServerProperties ACCESS_OVERRIDE_ORDER ?</li>
  </ul>
  
  <p>I am currently using <code>SecurityProperties ACCESS_OVERRIDE_ORDER</code> but based on the suggestion  <a href="https://github.com/spring-projects/spring-boot/issues/8255" rel="noreferrer">here</a> to get ACTUATOR working I need to enable <code>ManagementServerProperties ACCESS_OVERRIDE_ORDER</code>. Which one should I override if I want both working ?</p>
  
  <p>Thanks.</p>