title: Enable and disable endpoints at runtime with Spring boot
body: <p>Let's say I have the following controller:</p>
  
  <pre><code>@RestController
  public class MyController {
      @GetMapping("v1/remain")
      public MyObject getRemain() {
          // ...
      }
  }
  </code></pre>
  
  <p>How can I enable or disable this endpoint at runtime dynamically with Spring boot? Also, is it possible to change this without having to restart the application?</p>