title: spring admin server ui : metrics and info end points are not mapping (returns 404)
body: <p>I have a spring cloud services with the following spring package versions</p>
  
  <pre><code>&lt;dependency&gt;
              &lt;!-- Import dependency management from Spring Boot --&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-dependencies&lt;/artifactId&gt;
              &lt;version&gt;1.4.2.RELEASE&lt;/version&gt;
              &lt;type&gt;pom&lt;/type&gt;
              &lt;scope&gt;import&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
              &lt;artifactId&gt;spring-cloud-dependencies&lt;/artifactId&gt;
              &lt;version&gt;Brixton.SR4&lt;/version&gt;
              &lt;type&gt;pom&lt;/type&gt;
              &lt;scope&gt;import&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;de.codecentric&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-admin-server&lt;/artifactId&gt;
              &lt;version&gt;1.3.7&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;de.codecentric&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-admin-server-ui&lt;/artifactId&gt;
              &lt;version&gt;1.3.7&lt;/version&gt;
          &lt;/dependency&gt;   
  </code></pre>
  
  <p>and I have my spring boot admin server ui running in 9003 port. I am using eureka discovery client to register my end points to the registry service.</p>
  
  <p>My application.yml for the service is contains the following configurations.</p>
  
  <pre><code>server:
    context-path: /myservice
    port: 0
  
  management:
    context-path: /mng
    security:
      enabled: false
  
  eureka:
    instance:
      preferIpAddress: true   
      statusPageUrlPath: ${server.context-path:}${management.context-path:}/info
      healthCheckUrlPath: ${server.context-path:}${management.context-path:}/health
    client:
      serviceUrl:
        defaultZone: http://${EUREKA_DNS:localhost}:8761/eureka/
  </code></pre>
  
  <p>When I start my service I can see the following logs regarding my api endpoint </p>
  
  <pre><code>2018-01-11 16:01:22.176  INFO 6070 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/mng/health || /mng/health.json],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.HealthMvcEndpoint.invoke(java.security.Principal)
  2018-01-11 16:01:22.177  INFO 6070 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/mng/info || /mng/info.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
  2018-01-11 16:01:22.177  INFO 6070 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/mng/mappings || /mng/mappings.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
  2018-01-11 16:01:22.177  INFO 6070 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/mng/metrics/{name:.*}],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.MetricsMvcEndpoint.value(java.lang.String)
  2018-01-11 16:01:22.178  INFO 6070 --- [           main] o.s.b.a.e.mvc.EndpointHandlerMapping     : Mapped "{[/mng/metrics || /mng/metrics.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
  </code></pre>
  
  <p>when I start my dashboard following mapping info logs are printed</p>
  
  <pre><code>2018-01-11 22:04:00.886  INFO 55 --- [tp1976870338-18] o.s.c.n.zuul.web.ZuulHandlerMapping      : Mapped URL path [/api/applications/c5a746b1/health/**] onto handler of type [class org.springframework.cloud.netflix.zuul.web.ZuulController]
  2018-01-11 22:04:00.886  INFO 55 --- [tp1976870338-18] o.s.c.n.zuul.web.ZuulHandlerMapping      : Mapped URL path [/api/applications/c5a746b1/env/**] onto handler of type [class org.springframework.cloud.netflix.zuul.web.ZuulController]
  2018-01-11 22:04:00.886  INFO 55 --- [tp1976870338-18] o.s.c.n.zuul.web.ZuulHandlerMapping      : Mapped URL path [/api/applications/c5a746b1/metrics/**] onto handler of type [class org.springframework.cloud.netflix.zuul.web.ZuulController]
  </code></pre>
  
  <p>My problem now is when I open my dashboard Ui, its is trying to get the metrics info from "/api/applications/c5a746b1/metrics" but it returns 404 error. but in the browser when I type manually "/myservice/mng/metrics", I can see the metrics info. </p>
  
  <p>I am newbee to the spring cloud , any help appreciated.</p>
  
  <p>thanks in advance </p>