title: Spring Boot /actuator returns 404 not found
body: <p>I am using spring boot <code>2.1.4.RELEASE</code> and currently trying to access <a href="http://localhost:8080/actuator" rel="noreferrer">http://localhost:8080/actuator</a> but i am getting 404 not found. I am not sure what am i doing wrong here. Below is my pom dependencies-</p>
  
  <pre><code> &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;groupId&gt;com.dir&lt;/groupId&gt;
      &lt;artifactId&gt;api&lt;/artifactId&gt;
      &lt;version&gt;2.4.0&lt;/version&gt;
      &lt;packaging&gt;jar&lt;/packaging&gt;
  
      &lt;name&gt;Search&lt;/name&gt;
      &lt;description&gt;Search&lt;/description&gt;
  
      &lt;parent&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
          &lt;version&gt;2.1.4.RELEASE&lt;/version&gt;
          &lt;relativePath/&gt; &lt;!-- lookup parent from repository --&gt;
      &lt;/parent&gt;
  
      &lt;distributionManagement&gt;
          &lt;repository&gt;
              &lt;id&gt;Releases&lt;/id&gt;
              &lt;name&gt;repo1.releases&lt;/name&gt;
              &lt;url&gt;http://www.something.com&lt;/url&gt;
          &lt;/repository&gt;
          &lt;snapshotRepository&gt;
              &lt;id&gt;Snapshots&lt;/id&gt;
              &lt;name&gt;repo1.com&lt;/name&gt;
              &lt;url&gt;http://repo1.com/artifactory/Snapshots&lt;/url&gt;
          &lt;/snapshotRepository&gt;
      &lt;/distributionManagement&gt;
  
  
      &lt;properties&gt;
          &lt;!--These two should be in all ParentPOMs --&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
          &lt;!-- Keep this version in sync with the pom's version ignoring "-SNAPSHOT" --&gt;
          &lt;applicationVersion&gt;1.0.0&lt;/applicationVersion&gt;
          &lt;elasticsearch.version&gt;5.2.0&lt;/elasticsearch.version&gt;
          &lt;project.reporting.outputEncoding&gt;UTF-8&lt;/project.reporting.outputEncoding&gt;
          &lt;java.version&gt;1.8&lt;/java.version&gt;
      &lt;/properties&gt;
  
      &lt;dependencies&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-test&lt;/artifactId&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-configuration-processor&lt;/artifactId&gt;
              &lt;optional&gt;true&lt;/optional&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;io.springfox&lt;/groupId&gt;
              &lt;artifactId&gt;springfox-swagger2&lt;/artifactId&gt;
              &lt;version&gt;2.4.0&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;io.springfox&lt;/groupId&gt;
              &lt;artifactId&gt;springfox-swagger-ui&lt;/artifactId&gt;
              &lt;version&gt;2.4.0&lt;/version&gt;
          &lt;/dependency&gt;
  
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-webflux&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;io.swagger&lt;/groupId&gt;
              &lt;artifactId&gt;swagger-annotations&lt;/artifactId&gt;
              &lt;version&gt;1.5.7&lt;/version&gt;
          &lt;/dependency&gt;
  
  
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.google.code.gson&lt;/groupId&gt;
              &lt;artifactId&gt;gson&lt;/artifactId&gt;
              &lt;version&gt;2.8.0&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.elasticsearch.client&lt;/groupId&gt;
              &lt;artifactId&gt;x-pack-transport&lt;/artifactId&gt;
              &lt;version&gt;5.2.1&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.elasticsearch.client&lt;/groupId&gt;
              &lt;artifactId&gt;transport&lt;/artifactId&gt;
              &lt;version&gt;5.2.0&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.elasticsearch&lt;/groupId&gt;
              &lt;artifactId&gt;elasticsearch&lt;/artifactId&gt;
              &lt;version&gt;5.2.0&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;apache-lang&lt;/groupId&gt;
              &lt;artifactId&gt;commons-lang&lt;/artifactId&gt;
              &lt;version&gt;2.1&lt;/version&gt;
          &lt;/dependency&gt;
  
  
  
          &lt;dependency&gt;
              &lt;groupId&gt;io.jsonwebtoken&lt;/groupId&gt;
              &lt;artifactId&gt;jjwt&lt;/artifactId&gt;
              &lt;version&gt;0.7.0&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;log4j&lt;/groupId&gt;
              &lt;artifactId&gt;log4j&lt;/artifactId&gt;
              &lt;version&gt;1.2.17&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Spring boot actuator to expose metrics endpoint --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-actuator&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Micormeter core dependecy  --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;io.micrometer&lt;/groupId&gt;
              &lt;artifactId&gt;micrometer-core&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;!-- Micrometer Prometheus registry  --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;io.micrometer&lt;/groupId&gt;
              &lt;artifactId&gt;micrometer-registry-prometheus&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
  
  
  
      &lt;/dependencies&gt;
  
  
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-deploy-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.8.2&lt;/version&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
                  &lt;configuration&gt;
                      &lt;environmentVariables&gt;
                          &lt;version&gt;9.9.9&lt;/version&gt;
                          &lt;basePath&gt;http://sample-basepath.com&lt;/basePath&gt;
  
                      &lt;/environmentVariables&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
  
          &lt;resources&gt;
              &lt;resource&gt;
                  &lt;directory&gt;src/main/resources&lt;/directory&gt;
              &lt;/resource&gt;
          &lt;/resources&gt;
  
      &lt;/build&gt;
  
  
  &lt;/project&gt;
  </code></pre>
  
  <p>properties file config</p>
  
  <pre><code>management.endpoint.metrics.enabled=true
  management.endpoints.web.exposure.include=*
  management.endpoint.prometheus.enabled=true
  management.metrics.export.prometheus.enabled=true
  management.endpoint.health.show-details=always
  management.endpoint.beans.enabled=true
  </code></pre>
  
  <p>when i run the application i do see this in console</p>
  
  <pre><code>2019-04-27 00:04:25.406  INFO 32522 --- [           main] o.s.b.a.e.web.EndpointLinksResolver      : Exposing 16 endpoint(s) beneath base path '/actuator'
  2019-04-27 00:04:25.534  INFO 32522 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8080 (http) with context path '/myendpoint'
  </code></pre>