title: SpringBoot 2 Actuator with Spring Security
body: <p>How do I make use of Spring Security for securing the actuator endpoints but not interfere with any of the other application URLs? The security mechanism in our application is handled by a different framework so I would like to disable Spring Security by default and only enabled for <code>/actuator/</code> endpoints.</p>
  
  <p>To achieve this, I've added the following to the initialization class.</p>
  
  <pre><code>@SpringBootApplication(exclude = { SecurityAutoConfiguration.class })
  </code></pre>
  
  <p>With that, the Spring Security default configuration is disabled. After this, what changes do I need to make configure security for actuator endpoints?</p>