title: Spring Boot 2 Custom Actuator Endpoints
body: <p>Spring Noob: OK. I start with a STS Spring Starter Project / Maven / Java 8 / Spring Boot 2.0, and select the Web and Actuator dependencies. It builds and runs fine, and reponds to <a href="http://localhost:8080/actuator/health" rel="noreferrer">http://localhost:8080/actuator/health</a>. I add an "Endpoint" to the main application class, so that it looks like this.</p>
  
  <pre><code>package com.thumbsup;
  
  import org.springframework.boot.SpringApplication;
  import org.springframework.boot.actuate.endpoint.annotation.Endpoint;
  import org.springframework.boot.actuate.endpoint.annotation.ReadOperation;
  import org.springframework.boot.actuate.endpoint.annotation.Selector;
  import org.springframework.boot.autoconfigure.SpringBootApplication;
  
  @SpringBootApplication
  public class YourStash11Application {
  
      public static void main(String[] args) {
          SpringApplication.run(YourStash11Application.class, args);
      }
  
      @Endpoint(id="mypoint")
      public class CustomPoint {
          @ReadOperation
          public String getHello(){
              return "Hello" ;
          }
      }
  
  }
  </code></pre>
  
  <p>I try to enable everything in application.properties:</p>
  
  <pre><code>management.endpoints.enabled-by-default=true
  management.endpoint.conditions.enabled=true
  management.endpoint.mypoint.enabled=true
  management.endpoints.web.exposure.include=*
  </code></pre>
  
  <p>But when it builds, there's no reference to mapping /actuator/mypoint, and<br>
  <a href="http://localhost:8080/actuator/mypoint" rel="noreferrer">http://localhost:8080/actuator/mypoint</a> and<br>
  <a href="http://localhost:8080/application/mypoint" rel="noreferrer">http://localhost:8080/application/mypoint</a><br>
  both return 404 errors.</p>
  
  <p>What am I missing? Thanks!</p>